Version Description
-
*
Download this release
Release Info
Developer | hannanstd |
Plugin | گرویتی فرم فارسی |
Version | 2.0.0 |
Comparing to | |
See all releases |
Code changes from version 1.8.0 to 2.0.0
- Persian_Gravityforms_By_HANNANStd.php +0 -1413
- assets/css/admin.css +0 -85
- assets/css/admin.rtl.css +69 -0
- assets/css/font.droidsans.css +16 -0
- assets/css/font.yekan.css +29 -0
- assets/css/persian-gravity-form.css +0 -7
- assets/css/{printer.css → print.rtl.css} +0 -0
- assets/js/date-picker.js +0 -39
- assets/js/iran-cities.js +2874 -0
- assets/js/iran-cities.min.js +4 -0
- assets/js/jalali.date.picker.js +2 -0
- assets/js/keyboard.js +0 -823
- assets/js/melli-code.js +539 -0
- assets/js/melli-code.min.js +1 -0
- assets/js/wp-admin-datepicker.js +0 -1
- include/Jalali.php +0 -493
- include/Live_Preview.php +0 -102
- include/News_Letter.php +0 -63
- include/Post_Content_Merge_Tags.php +0 -154
- include/Snippets.php +0 -25
- include/wp-session.php +0 -232
- includes/class-iran-cities.php +173 -0
- includes/class-jalali-date.php +282 -0
- includes/class-live-preview.php +190 -0
- includes/class-melli-code.php +434 -0
- include/Multipage_Navigation.php → includes/class-multipage-navigation.php +14 -50
- includes/class-news-letter.php +50 -0
- includes/class-post-content-merge-tags.php +245 -0
- include/Pre_Submission.php → includes/class-pre-submission.php +9 -10
- includes/class-snippets.php +81 -0
- includes/class-subtotal-calc.php +243 -0
- includes/class-wp-session.php +284 -0
- includes/class-wpp-gravity-forms.php +116 -0
- index.php +28 -0
- languages/GF_FA-fa_IR.mo +0 -0
- languages/GF_FA-fa_IR.po +647 -0
- languages/Persian_Gravityforms_By_HANNANStd-fa_IR.mo +0 -0
- languages/Persian_Gravityforms_By_HANNANStd-fa_IR.po +0 -555
- lib/jdf.php +640 -0
- persian-gravity.php +810 -0
- readme.txt +106 -153
Persian_Gravityforms_By_HANNANStd.php
DELETED
@@ -1,1413 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
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.8.0
|
7 |
-
Requires at least: 4.0
|
8 |
-
Author: HANNAN Ebrahimi Setoode
|
9 |
-
Author URI: http://www.gravityforms.ir/
|
10 |
-
Text Domain: Persian_Gravityforms_By_HANNANStd
|
11 |
-
Domain Path: /languages/
|
12 |
-
License: GPL 2
|
13 |
-
*/
|
14 |
-
add_action('plugins_loaded', 'Load_Live_Preview', 0);
|
15 |
-
function Load_Live_Preview() {
|
16 |
-
require_once("include/Live_Preview.php");
|
17 |
-
}
|
18 |
-
|
19 |
-
require_once("include/News_Letter.php");
|
20 |
-
if(class_exists("GFIR_NewsLetter"))
|
21 |
-
new GFIR_NewsLetter();
|
22 |
-
|
23 |
-
require_once("include/Pre_Submission.php");
|
24 |
-
if(class_exists("GFIR_PreSubmission"))
|
25 |
-
GFIR_PreSubmission::init();
|
26 |
-
|
27 |
-
require_once("include/Snippets.php");
|
28 |
-
if(class_exists("GFIR_PostPermalink"))
|
29 |
-
new GFIR_PostPermalink();
|
30 |
-
|
31 |
-
require_once("include/Multipage_Navigation.php");
|
32 |
-
require_once("include/wp-session.php");
|
33 |
-
class GravityFormsPersian {
|
34 |
-
private $file;
|
35 |
-
private $language;
|
36 |
-
private $is_persian;
|
37 |
-
public function __construct( $file ) {
|
38 |
-
$this->file = $file;
|
39 |
-
//actions
|
40 |
-
add_action('init', array( $this, 'init' ), 8 );
|
41 |
-
add_action('admin_footer', array( $this,'Gravity_Form_Admin_Footer_By_HANNANStd'));
|
42 |
-
add_action('gform_post_status_options', array( $this, 'Add_Private_Post_Status_By_HANNANStd'));
|
43 |
-
add_action('activated_plugin', array( $this, 'Activated_Plugin_By_HANNANStd' ) );
|
44 |
-
add_action('wp_footer', array($this ,'Add_RTL_Style_To_Footer_By_HANNANStd'));
|
45 |
-
add_action('gform_admin_pre_render', array( $this, 'Add_Merge_Tags_To_List_By_HANNANStd'));
|
46 |
-
add_action('wp_dashboard_setup', array( $this, 'Persian_GravityForms_Dashboard_By_HANNANStd'));
|
47 |
-
add_action('admin_print_scripts', array( $this, 'GravityForms_Admin_Script_Css_By_HANNANStd' ));
|
48 |
-
add_action('gform_field_standard_settings', array( $this, 'Add_Field_Active_Standard_Settings'), 10, 2);
|
49 |
-
add_action('gform_editor_js', array( $this, 'Editor_Script_By_HANNANStd'));
|
50 |
-
add_action('gform_enqueue_scripts', array( $this, 'Add_Script_Css_Front_End_By_HANNANStd'), 10 , 2 );
|
51 |
-
add_action('gform_field_input', array( $this,'Add_Melli_Cart_Field_Input_By_HANNANStd'), 10, 5);
|
52 |
-
add_action('gform_field_css_class', array( $this, 'Add_Melli_Cart_Field_Class_By_HANNANStd'), 10, 3);
|
53 |
-
add_action('gform_field_advanced_settings', array( $this, 'Add_Melli_Cart_Field_Setting_By_HANNANStd'), 10, 2);
|
54 |
-
add_action('gform_entries_first_column', array($this ,'First_Column_Actions_By_HANNANStd'), 10, 5);
|
55 |
-
add_action('gform_entry_post_save', array($this ,'Update_Lead_No_Gateway_By_HANNANStd'), 10, 2);
|
56 |
-
add_action('gform_pre_submission', array( $this, 'Mellicart_Pre_Submission_By_HANNANStd' ) );
|
57 |
-
|
58 |
-
//filters
|
59 |
-
add_filter('update_footer', array( $this, 'GravityForms_Footer_Left_By_HANNANStd'), 11);
|
60 |
-
add_filter('load_textdomain_mofile', array( $this, 'Load_Textdomain_Mo_File_By_HANNANStd'), 10, 2 );
|
61 |
-
add_filter('gform_currencies', array( $this, 'Update_Currency_By_HANNANStd' ) );
|
62 |
-
add_filter('gform_address_types', array( $this, 'Gform_IRAN_By_HANNANStd' ) );
|
63 |
-
add_filter('gform_replace_merge_tags', array( $this, 'GformReplaceMergeTags_By_HANNANStd'), 10, 7);
|
64 |
-
add_filter('gform_print_styles', array( $this, 'Add_Styles_Print_By_HANNANStd'), 10, 2);
|
65 |
-
add_filter('gform_predefined_choices', array( $this, 'Add_Iran_Predefined_Choice_By_HANNANStd' ),1);
|
66 |
-
add_filter('gform_tooltips', array( $this, 'Add_Encryption_tooltips_By_HANNANStd'));
|
67 |
-
add_filter('gform_add_field_buttons', array( $this, 'Add_HANNANStd_Field_By_HANNANStd'));
|
68 |
-
add_filter('gform_field_type_title', array( $this,'Add_HANNANStd_Field_Title_By_HANNANStd'));
|
69 |
-
add_filter('gform_editor_js_set_default_values', array( $this, 'Add_HANNANStd_Field_Label_By_HANNANStd'));
|
70 |
-
add_filter('gform_field_content', array( $this, 'Add_Melli_Cart_Field_JavaScript_Checker_By_HANNANStd'), 10, 5);
|
71 |
-
add_filter('gform_field_validation', array( $this, 'Input_Valid_Checker_By_HANNANStd'), 10, 4);
|
72 |
-
add_filter('gform_noconflict_styles', array( $this, 'Register_Style_to_No_Conflict_By_HANNANStd'));
|
73 |
-
add_filter('gform_noconflict_scripts', array( $this, 'Register_Script_to_No_Conflict_By_HANNANStd'));
|
74 |
-
add_filter('gform_is_duplicate', array( $this, 'Better_noDuplicate' ), 10, 4 );
|
75 |
-
}
|
76 |
-
|
77 |
-
|
78 |
-
public function Activated_Plugin_By_HANNANStd() {
|
79 |
-
$path = str_replace( WP_PLUGIN_DIR . '/', '', $this->file );
|
80 |
-
if ( $plugins = get_option( 'active_plugins' ) ) {
|
81 |
-
if ( $key = array_search( $path, $plugins ) ) {
|
82 |
-
array_splice( $plugins, $key, 1 );
|
83 |
-
array_unshift( $plugins, $path );
|
84 |
-
update_option( 'active_plugins', $plugins );
|
85 |
-
}
|
86 |
-
}
|
87 |
-
if ( $plugins = get_site_option( 'active_sitewide_plugins' ) ) {
|
88 |
-
if ( $key = array_search( $path, $plugins ) ) {
|
89 |
-
array_splice( $plugins, $key, 1 );
|
90 |
-
array_unshift( $plugins, $path );
|
91 |
-
update_site_option( 'active_sitewide_plugins', $plugins );
|
92 |
-
}
|
93 |
-
}
|
94 |
-
}
|
95 |
-
public function init(){
|
96 |
-
if ( get_option( 'gform_pending_installation' ) ) {
|
97 |
-
update_option( 'gform_pending_installation', false );
|
98 |
-
$current_version = get_option( 'rg_form_version' );
|
99 |
-
if ( $current_version === false ){
|
100 |
-
if(class_exists("GFCommon"))
|
101 |
-
update_option( 'rg_form_version', GFCommon::$version );
|
102 |
-
else
|
103 |
-
update_option( 'rg_form_version', '1.9.0' );
|
104 |
-
}
|
105 |
-
}
|
106 |
-
require_once("include/Jalali.php");
|
107 |
-
require_once("include/Post_Content_Merge_Tags.php");
|
108 |
-
$rel_path = dirname( plugin_basename( $this->file ) ) . '/languages/';
|
109 |
-
if ( $this->language == null && defined('WPLANG') ) {
|
110 |
-
$this->language = get_option( 'WPLANG', WPLANG );
|
111 |
-
$this->is_persian = ( $this->language == 'fa' || $this->language == 'fa_IR' );
|
112 |
-
}
|
113 |
-
if ( defined( 'ICL_LANGUAGE_CODE' ) ) {
|
114 |
-
$this->is_persian = ( ICL_LANGUAGE_CODE == 'fa' );
|
115 |
-
}
|
116 |
-
load_plugin_textdomain( 'Persian_Gravityforms_By_HANNANStd', false, $rel_path );
|
117 |
-
}
|
118 |
-
protected static function get_base_path(){
|
119 |
-
$folder = basename(dirname(__FILE__));
|
120 |
-
return WP_PLUGIN_DIR . "/" . $folder;
|
121 |
-
}
|
122 |
-
public function Load_Textdomain_Mo_File_By_HANNANStd( $mo_file, $domain ) {
|
123 |
-
if ( strpos( $mo_file, 'fa_IR.mo' ) !== false ) {
|
124 |
-
$domains = array(
|
125 |
-
'gravityformscoupons' => array(
|
126 |
-
'languages/gravityformscoupons-fa_IR.mo' => 'gravityformscoupons/fa_IR.mo'
|
127 |
-
),
|
128 |
-
'gravityformsmailchimp' => array(
|
129 |
-
'languages/gravityformsmailchimp-fa_IR.mo' => 'gravityformsmailchimp/fa_IR.mo'
|
130 |
-
),
|
131 |
-
'gravityformspolls' => array(
|
132 |
-
'languages/gravityformspolls-fa_IR.mo' => 'gravityformspolls/fa_IR.mo'
|
133 |
-
),
|
134 |
-
'gravityformsquiz' => array(
|
135 |
-
'languages/gravityformsquiz-fa_IR.mo' => 'gravityformsquiz/fa_IR.mo'
|
136 |
-
),
|
137 |
-
'gravityformssignature' => array(
|
138 |
-
'languages/gravityformssignature-fa_IR.mo' => 'gravityformssignature/fa_IR.mo'
|
139 |
-
),
|
140 |
-
'gravityformssurvey' => array(
|
141 |
-
'languages/gravityformssurvey-fa_IR.mo' => 'gravityformssurvey/fa_IR.mo'
|
142 |
-
),
|
143 |
-
'gravityformsuserregistration' => array(
|
144 |
-
'languages/gravityformsuserregistration-fa_IR.mo' => 'gravityformsuserregistration/fa_IR.mo'
|
145 |
-
),
|
146 |
-
'gravityformsauthorizenet' => array(
|
147 |
-
'languages/gravityformsauthorizenet-fa_IR.mo' => 'gravityformsauthorizenet/fa_IR.mo'
|
148 |
-
),
|
149 |
-
'gravityformsaweber' => array(
|
150 |
-
'languages/gravityformsaweber-fa_IR.mo' => 'gravityformsaweber/fa_IR.mo'
|
151 |
-
),
|
152 |
-
'gravityformscampaignmonitor' => array(
|
153 |
-
'languages/gravityformscampaignmonitor-fa_IR.mo' => 'gravityformscampaignmonitor/fa_IR.mo'
|
154 |
-
),
|
155 |
-
'gravityformsfreshbooks' => array(
|
156 |
-
'languages/gravityformsfreshbooks-fa_IR.mo' => 'gravityformsfreshbooks/fa_IR.mo'
|
157 |
-
),
|
158 |
-
'gravityformspaypal' => array(
|
159 |
-
'languages/gravityformspaypal-fa_IR.mo' => 'gravityformspaypal/fa_IR.mo'
|
160 |
-
),
|
161 |
-
'gravityformspaypalpro' => array(
|
162 |
-
'languages/gravityformspaypalpro-fa_IR.mo' => 'gravityformspaypalpro/fa_IR.mo'
|
163 |
-
),
|
164 |
-
'gravityformspaypalpaymentspro' => array(
|
165 |
-
'languages/gravityformspaypalpaymentspro-fa_IR.mo' => 'gravityformspaypalpaymentspro/fa_IR.mo'
|
166 |
-
),
|
167 |
-
'gravityformstwilio' => array(
|
168 |
-
'languages/gravityformstwilio-fa_IR.mo' => 'gravityformstwilio/fa_IR.mo'
|
169 |
-
),
|
170 |
-
'gravityformsstripe' => array(
|
171 |
-
'languages/gravityformsstripe-fa_IR.mo' => 'gravityformsstripe/fa_IR.mo'
|
172 |
-
),
|
173 |
-
'gravityformszapier' => array(
|
174 |
-
'languages/gravityformszapier-fa_IR.mo' => 'gravityformszapier/fa_IR.mo'
|
175 |
-
),
|
176 |
-
'sticky-list' => array(
|
177 |
-
'languages/sticky-list-fa_IR.mo' => 'gravityformsstickylist/fa_IR.mo'
|
178 |
-
),
|
179 |
-
'gf-limit' => array(
|
180 |
-
'gf-limit-fa_IR.mo' => 'gravityformsquantitylimits/fa_IR.mo'
|
181 |
-
),
|
182 |
-
'gf-limit' => array(
|
183 |
-
'languages/gf-limit-fa_IR.mo' => 'gravityformsquantitylimits/fa_IR.mo'
|
184 |
-
)
|
185 |
-
);
|
186 |
-
|
187 |
-
|
188 |
-
if (self::is_gravityforms_new()) {
|
189 |
-
$Gdomains = array(
|
190 |
-
'gravityforms' => array(
|
191 |
-
'languages/gravityforms-fa_IR.mo' => 'gravityforms1.9/fa_IR.mo'
|
192 |
-
)
|
193 |
-
);
|
194 |
-
}
|
195 |
-
else
|
196 |
-
{
|
197 |
-
$Gdomains = array(
|
198 |
-
'gravityforms' => array(
|
199 |
-
'languages/gravityforms-fa_IR.mo' => 'gravityforms1.8/fa_IR.mo'
|
200 |
-
)
|
201 |
-
);
|
202 |
-
}
|
203 |
-
|
204 |
-
$domains = array_merge($domains,$Gdomains);
|
205 |
-
|
206 |
-
if ( isset( $domains[$domain] ) ) {
|
207 |
-
$paths = $domains[$domain];
|
208 |
-
foreach ( $paths as $path => $file ) {
|
209 |
-
if ( substr( $mo_file, -strlen( $path ) ) == $path ) {
|
210 |
-
$new_file = dirname( $this->file ) . '/languages/' . $file;
|
211 |
-
if ( is_readable( $new_file ) ) {
|
212 |
-
$mo_file = $new_file;
|
213 |
-
}
|
214 |
-
}
|
215 |
-
}
|
216 |
-
}
|
217 |
-
}
|
218 |
-
return $mo_file;
|
219 |
-
}
|
220 |
-
|
221 |
-
private static function is_gravityforms_new(){
|
222 |
-
if(class_exists("GFCommon")){
|
223 |
-
$is_new_version = version_compare(GFCommon::$version, '1.9.0', ">=");
|
224 |
-
return $is_new_version;
|
225 |
-
}
|
226 |
-
else{
|
227 |
-
return false;
|
228 |
-
}
|
229 |
-
}
|
230 |
-
|
231 |
-
|
232 |
-
public function Better_noDuplicate( $count, $form_id, $field, $value ) {
|
233 |
-
global $wpdb;
|
234 |
-
|
235 |
-
$lead_detail_table_name = GFFormsModel::get_lead_details_table_name();
|
236 |
-
$lead_table_name = GFFormsModel::get_lead_table_name();
|
237 |
-
$lead_detail_long = GFFormsModel::get_lead_details_long_table_name();
|
238 |
-
$is_long = ! is_array( $value ) && strlen( $value ) > GFORMS_MAX_FIELD_LENGTH - 10;
|
239 |
-
|
240 |
-
$sql_comparison = $is_long ? '( ld.value = %s OR ldl.value = %s )' : 'ld.value = %s';
|
241 |
-
|
242 |
-
switch ( GFFormsModel::get_input_type( $field ) ) {
|
243 |
-
case 'time':
|
244 |
-
$value = sprintf( "%02d:%02d %s", $value[0], $value[1], $value[2] );
|
245 |
-
break;
|
246 |
-
case 'date':
|
247 |
-
$value = GFFormsModel::prepare_date( $field->dateFormat, $value );
|
248 |
-
break;
|
249 |
-
case 'number':
|
250 |
-
$value = GFCommon::clean_number( $value, $field->numberFormat );
|
251 |
-
break;
|
252 |
-
case 'phone':
|
253 |
-
$value = str_replace( array( ')', '(', '-', ' ' ), '', $value );
|
254 |
-
$sql_comparison = 'replace( replace( replace( replace( ld.value, ")", "" ), "(", "" ), "-", "" ), " ", "" ) = %s';
|
255 |
-
break;
|
256 |
-
case 'email':
|
257 |
-
$value = is_array( $value ) ? rgar( $value, 0 ) : $value;
|
258 |
-
break;
|
259 |
-
}
|
260 |
-
|
261 |
-
$inner_sql_template = "SELECT %s as input, ld.lead_id
|
262 |
-
FROM {$lead_detail_table_name} ld
|
263 |
-
INNER JOIN {$lead_table_name} l ON l.id = ld.lead_id\n";
|
264 |
-
|
265 |
-
if ( $is_long ) {
|
266 |
-
$inner_sql_template .= "INNER JOIN {$lead_detail_long} ldl ON ldl.lead_detail_id = ld.id\n";
|
267 |
-
}
|
268 |
-
|
269 |
-
$inner_sql_template .= "WHERE l.form_id=%d AND ld.form_id=%d
|
270 |
-
AND ld.field_number between %s AND %s
|
271 |
-
AND status='active'
|
272 |
-
AND ( LOWER(payment_status)='paid' OR LOWER(payment_status)='active'
|
273 |
-
OR LOWER(payment_status)='actived' OR LOWER(payment_status)='complete'
|
274 |
-
OR LOWER(payment_status)='completed' OR LOWER(payment_status)='completed'
|
275 |
-
OR LOWER(payment_status)='' OR payment_status='null' OR payment_status='NULL'
|
276 |
-
OR LOWER(payment_status)=NULL OR payment_status=null OR payment_status IS NULL )
|
277 |
-
AND {$sql_comparison}";
|
278 |
-
|
279 |
-
$sql = "SELECT count(distinct input) as match_count FROM ( ";
|
280 |
-
|
281 |
-
$input_count = 1;
|
282 |
-
if ( is_array( $field->get_entry_inputs() ) ) {
|
283 |
-
$input_count = sizeof( $field->inputs );
|
284 |
-
foreach ( $field->inputs as $input ) {
|
285 |
-
$union = empty( $inner_sql ) ? '' : ' UNION ALL ';
|
286 |
-
$inner_sql .= $union . $wpdb->prepare( $inner_sql_template, $input['id'], $form_id, $form_id, $input['id'] - 0.0001, $input['id'] + 0.0001, $value[ $input['id'] ], $value[ $input['id'] ] );
|
287 |
-
}
|
288 |
-
} else {
|
289 |
-
$inner_sql = $wpdb->prepare( $inner_sql_template, $field->id, $form_id, $form_id, doubleval( $field->id ) - 0.0001, doubleval( $field->id ) + 0.0001, $value, $value );
|
290 |
-
}
|
291 |
-
|
292 |
-
$sql .= $inner_sql . "
|
293 |
-
) as count
|
294 |
-
GROUP BY lead_id
|
295 |
-
ORDER BY match_count DESC";
|
296 |
-
|
297 |
-
$count = gf_apply_filters( 'gform_is_duplicate_better', $form_id, $wpdb->get_var( $sql ), $form_id, $field, $value );
|
298 |
-
|
299 |
-
return $count != null && $count >= $input_count;
|
300 |
-
}
|
301 |
-
|
302 |
-
|
303 |
-
public function Add_Field_Active_Standard_Settings($position, $form_id){
|
304 |
-
if($position == 25){
|
305 |
-
?>
|
306 |
-
<li class="Jalali_setting field_setting">
|
307 |
-
<input type="checkbox" id="check_jalali" onclick="SetFieldProperty('check_jalali', jQuery(this).is(':checked') ? 1 : 0);"/>
|
308 |
-
<label class="inline gfield_value_label" for="field_admin_label">
|
309 |
-
<?php _e( 'فعالسازی تاریخ شمسی', 'Persian_Gravityforms_By_HANNANStd' ); ?>
|
310 |
-
<?php gform_tooltip("form_check_jalali") ?>
|
311 |
-
</label>
|
312 |
-
</li>
|
313 |
-
<?php /*
|
314 |
-
<li class="keyboard_setting field_setting">
|
315 |
-
<label class="inline gfield_value_label" for="field_admin_label">
|
316 |
-
<?php _e( 'نحوه استفاده از کیبورد', 'Persian_Gravityforms_By_HANNANStd' ); ?>
|
317 |
-
<?php gform_tooltip("form_field_keyboard_desc") ?>
|
318 |
-
</label>
|
319 |
-
</br>
|
320 |
-
<p>
|
321 |
-
برای استفاده از کیبورد کافی است پس از افزودن فیلد "کیبورد" از قسمت فیلد های پیشرفته ، به هر کدام از فیلدهایی که میخواهید دارای کیبورد شوند کلاس keyb را اضافه نمایید .
|
322 |
-
البته برچسب این فیلد را نیز خالی بگذارید تا در فرم دیده نشود.
|
323 |
-
</p>
|
324 |
-
</li>
|
325 |
-
<?php
|
326 |
-
*/
|
327 |
-
}
|
328 |
-
}
|
329 |
-
public function Editor_Script_By_HANNANStd(){
|
330 |
-
?>
|
331 |
-
<script type='text/javascript'>
|
332 |
-
fieldSettings["date"] += ", .Jalali_setting";
|
333 |
-
fieldSettings["mellicart"] = ".placeholder_setting, .label_placement_setting, .prepopulate_field_setting, .conditional_logic_field_setting, .label_setting, .admin_label_setting, .size_setting, .rules_setting, .visibility_setting, .duplicate_setting, .default_value_setting, .description_setting, .css_class_setting, .mellicart_setting";
|
334 |
-
//fieldSettings["keyboard"] = ".label_setting, .keyboard_setting";
|
335 |
-
jQuery(document).bind("gform_load_field_settings", function(event, field, form){
|
336 |
-
jQuery("#check_jalali").attr("checked", field["check_jalali"] == true);
|
337 |
-
jQuery("#field_mellicart").attr("checked", field["field_mellicart"] == true);
|
338 |
-
jQuery("#field_mellicart_sp").attr("checked", field["field_mellicart_sp"] == true);
|
339 |
-
jQuery("#field_mellicart_sp1").val(field["field_mellicart_sp1"]);
|
340 |
-
jQuery("#field_mellicart_sp2").val(field["field_mellicart_sp2"]);
|
341 |
-
jQuery("#field_mellicart_sp3").val(field["field_mellicart_sp3"]);
|
342 |
-
jQuery("#field_mellicart_sp4").val(field["field_mellicart_sp4"]);
|
343 |
-
});
|
344 |
-
</script>
|
345 |
-
<?php
|
346 |
-
}
|
347 |
-
public function Add_Encryption_tooltips_By_HANNANStd($tooltips){
|
348 |
-
$tooltips["form_check_jalali"] = "<h6>فعالسازی تاریخ شمسی</h6>در صورتی که از چند فیلد تاریخ استفاده میکنید ، فعالسازی تاریخ شمسی یکی از فیلدها کفایت میکند .<br/>تذکر : با توجه به آزمایشی بودن این قسمت ممکن است تداخل توابع سبب ناسازگاری با برخی قالب ها شود.";
|
349 |
-
$tooltips["form_field_mellicart"] = "<h6>نمایش لحظه ای شهر از روی کد ملی </h6>نمایش شهر و پیغام زیر فیلد کد ملی بعد از پر شدن فیلد . تذکر : در صورتی که این گزینه را فعال نمایید ،ممکن است فراخوانی شهر های ایران با توجه به زیاد بودن آنها سبب سنگین شدن صفحه گردد.";
|
350 |
-
$tooltips["form_field_mellicart_sp"] = "<h6>جدا سازی ارقام</h6>در صورتی که این گزینه را فعال نمایید ، پس از پر شدن فیلد ، <strong>در صورتی که کد ملی وارد شده صحیح تشخصی داده شود</strong> ؛ کد ملی به صورت زیر در خواهد آمد :<br/>xxx-xxxxxx-x";
|
351 |
-
$tooltips["form_field_mellicart_sp1"] = "<h6>پیغام پیشفرض</h6>با توجه به اینکه کد ملی فقط باید به صورت عدد باشد ، در صورتی که کاراکتری غیر از عدد وارد شده باشد پیغام خطا نمایش داده خواهد شد .<br/>پیغام پیشفرض : کد ملی فقط باید به صورت عدد وارد شود . ";
|
352 |
-
$tooltips["form_field_mellicart_sp2"] = "<h6>پیغام پیشفرض</h6>با توجه به اینکه کد ملی می بایست 10 رقمی باشد اگر تعداد رقم وارد شده ، اشتباه باشد پیغام خطا نمایش داده خواهد شد .<br>پیغام پیشفرض : کد ملی می بایست 10 رقمی باشد . تنها در صورتی مجاز به استفاده از کد های 8 یا 9 رقمی هستید که ارقام سمت چپ 0 باشند . ";
|
353 |
-
$tooltips["form_field_mellicart_sp3"] = "<h6>پیغام پیشفرض</h6>در صورتی که از تب وِیژگی تیک گزینه بدون تکرار را زده باشید ؛ بعد از پر شدن فرم و زدن دکمه ارسال پیغامی مبتنی بر تکراری بودن کد ملی نمایش داده خواهد شد . <br/>پیغام پیشفرض : این کد ملی توسط فرد دیگری ثبت شده است .";
|
354 |
-
$tooltips["form_field_mellicart_sp4"] = "<h6>پیغام پیشفرض</h6>در صورتی که کد ملی وارد شده مطابق با الگوریتم کشور نباشد پیغام خطا نمایش داده خواهد شد .<br/>پیغام پیشفرض : کد ملی وارد شده مطابق با استانداردهای کشور نمی باشد .";
|
355 |
-
$tooltips["form_field_mellicart_header"] = "<h6>پیغام خطا</h6>در صورتی که کاربر فیلد کد ملی را به صورت صحیح وارد نکند ؛ پیغام خطا را مشاهده میکند که میتوانید این پیغام ها را مدیریت نمایید . در صورتی که مقادیر زیر را خالی بگذارید پیغام پیشفرض نمایش داده خواهد شد.";
|
356 |
-
//$tooltips["form_field_keyboard_desc"] = "<h6>نحوه استفاده</h6>پس از اضافه کردن فیلد کیبورد به فرم ، کافیست به هر فیلدی که میخواهید کیبورد اضافه کنید ، کلاس keyb رو بیافزایید .";
|
357 |
-
return $tooltips;
|
358 |
-
}
|
359 |
-
function Add_Script_Css_Front_End_By_HANNANStd( $form, $ajax ) {
|
360 |
-
foreach ( $form['fields'] as $field ) {
|
361 |
-
if ( ( $field['type'] == 'date' ) ) {
|
362 |
-
if(rgget("check_jalali", $field)){
|
363 |
-
add_filter('gform_date_min_year', array( $this, 'Set_Min_Year_By_HANNANStd' ) );
|
364 |
-
add_filter('gform_date_max_year', array( $this, 'Set_Max_Year_By_HANNANStd' ) );
|
365 |
-
if (!IS_ADMIN)
|
366 |
-
{
|
367 |
-
wp_deregister_script('gform_datepicker_init');
|
368 |
-
wp_deregister_script('jquery-ui-datepicker');
|
369 |
-
wp_register_script('gform_datepicker_init',plugins_url ( '/assets/js/date-picker.js', __FILE__), array( 'jquery', 'jquery-ui-core' ), GFCommon::$version, true );
|
370 |
-
}
|
371 |
-
}
|
372 |
-
}
|
373 |
-
|
374 |
-
if ( ( $field['type'] == 'keyboard' ) ) {
|
375 |
-
if (!IS_ADMIN) {
|
376 |
-
wp_enqueue_script('Keyboard',plugins_url ( '/assets/js/keyboard.js', __FILE__), array(), true );
|
377 |
-
wp_enqueue_style('Keyboard', plugins_url ( '/assets/css/persian-gravity-form.css', __FILE__, null, GFCommon::$version ) );
|
378 |
-
}
|
379 |
-
}
|
380 |
-
|
381 |
-
}
|
382 |
-
}
|
383 |
-
public function Set_Min_Year_By_HANNANStd($min_year){
|
384 |
-
$min_year = GF_gregorian_to_jalali($min_year,03,21);
|
385 |
-
return $min_year[0]+1;
|
386 |
-
}
|
387 |
-
public function Set_Max_Year_By_HANNANStd($max_year){
|
388 |
-
$max_year = GF_gregorian_to_jalali($max_year,03,21);
|
389 |
-
return $max_year[0]+20;
|
390 |
-
}
|
391 |
-
public function GravityForms_Footer_Left_By_HANNANStd($text) {
|
392 |
-
$text = sprintf(__("%sGravity Forms%s for WordPress is a full featured contact form plugin .", "Persian_Gravityforms_By_HANNANStd"), '<a href="http://gravityforms.ir" target="_blank">', "</a>");return $text;
|
393 |
-
}
|
394 |
-
public function Add_Private_Post_Status_By_HANNANStd($post_status_options) {
|
395 |
-
$post_status_options['private'] = __("خصوصی", "Persian_Gravityforms_By_HANNANStd");
|
396 |
-
return $post_status_options;
|
397 |
-
}
|
398 |
-
public function Update_Currency_By_HANNANStd($currencies) {
|
399 |
-
$currencies['IRR'] = array("name" => __("ریال ایران", "Persian_Gravityforms_By_HANNANStd"), "symbol_left" => '', "symbol_right" => " ریال ", "symbol_padding" => "", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 0);
|
400 |
-
$currencies['IRT'] = array("name" => __("تومان", "Persian_Gravityforms_By_HANNANStd"), "symbol_left" => '', "symbol_right" => " تومان ", "symbol_padding" => " ", "thousand_separator" => ',', "decimal_separator" => '.', "decimals" => 0);
|
401 |
-
return $currencies;
|
402 |
-
}
|
403 |
-
public function Gform_IRAN_By_HANNANStd( $address_types ) {
|
404 |
-
$address_types['persian'] = array(
|
405 |
-
'label' => __( 'IRAN', 'Persian_Gravityforms_By_HANNANStd' ),
|
406 |
-
'country' => __( 'IRAN', 'Persian_Gravityforms_By_HANNANStd' ),
|
407 |
-
'zip_label' => __( 'Postal Code', 'Persian_Gravityforms_By_HANNANStd' ),
|
408 |
-
'state_label' => __( 'Province', 'Persian_Gravityforms_By_HANNANStd' ),
|
409 |
-
'states' => array( '',
|
410 |
-
__( 'Azarbaijan - East', 'Persian_Gravityforms_By_HANNANStd' ),
|
411 |
-
__( 'Azarbaijan - West', 'Persian_Gravityforms_By_HANNANStd' ),
|
412 |
-
__( 'Ardabil', 'Persian_Gravityforms_By_HANNANStd' ),
|
413 |
-
__( 'Isfahan', 'Persian_Gravityforms_By_HANNANStd' ),
|
414 |
-
__( 'Alborz', 'Persian_Gravityforms_By_HANNANStd' ),
|
415 |
-
__( 'Ilam', 'Persian_Gravityforms_By_HANNANStd' ),
|
416 |
-
__( 'Bushehr', 'Persian_Gravityforms_By_HANNANStd' ),
|
417 |
-
__( 'Tehran', 'Persian_Gravityforms_By_HANNANStd' ),
|
418 |
-
__( 'Chahar Mahaal and Bakhtiari', 'Persian_Gravityforms_By_HANNANStd' ),
|
419 |
-
__( 'Khorasan - South', 'Persian_Gravityforms_By_HANNANStd' ),
|
420 |
-
__( 'Khorasan - Razavi', 'Persian_Gravityforms_By_HANNANStd' ),
|
421 |
-
__( 'Khorasan - North', 'Persian_Gravityforms_By_HANNANStd' ),
|
422 |
-
__( 'Khuzestan', 'Persian_Gravityforms_By_HANNANStd' ),
|
423 |
-
__( 'Zanjan', 'Persian_Gravityforms_By_HANNANStd' ),
|
424 |
-
__( 'Semnan', 'Persian_Gravityforms_By_HANNANStd' ),
|
425 |
-
__( 'Sistan and Baluchistan', 'Persian_Gravityforms_By_HANNANStd' ),
|
426 |
-
__( 'Fars', 'Persian_Gravityforms_By_HANNANStd' ),
|
427 |
-
__( 'Qazvin', 'Persian_Gravityforms_By_HANNANStd' ),
|
428 |
-
__( 'Qom', 'Persian_Gravityforms_By_HANNANStd' ),
|
429 |
-
__( 'Kurdistan', 'Persian_Gravityforms_By_HANNANStd' ),
|
430 |
-
__( 'Kerman', 'Persian_Gravityforms_By_HANNANStd' ),
|
431 |
-
__( 'Kermanshah', 'Persian_Gravityforms_By_HANNANStd' ),
|
432 |
-
__( 'Kohgiluyeh and Boyer-Ahmad', 'Persian_Gravityforms_By_HANNANStd' ),
|
433 |
-
__( 'Golestan', 'Persian_Gravityforms_By_HANNANStd' ),
|
434 |
-
__( 'Gilan', 'Persian_Gravityforms_By_HANNANStd' ),
|
435 |
-
__( 'Lorestan', 'Persian_Gravityforms_By_HANNANStd' ),
|
436 |
-
__( 'Mazandaran', 'Persian_Gravityforms_By_HANNANStd' ),
|
437 |
-
__( 'Markazi', 'Persian_Gravityforms_By_HANNANStd' ),
|
438 |
-
__( 'Hormozgān', 'Persian_Gravityforms_By_HANNANStd' ),
|
439 |
-
__( 'Hamadan', 'Persian_Gravityforms_By_HANNANStd' ),
|
440 |
-
__( 'Yazd', 'Persian_Gravityforms_By_HANNANStd' )
|
441 |
-
)
|
442 |
-
);
|
443 |
-
return $address_types;
|
444 |
-
}
|
445 |
-
public function Add_Iran_Predefined_Choice_By_HANNANStd($choices){
|
446 |
-
$states[__( 'Provinces of Iran', 'Persian_Gravityforms_By_HANNANStd' )] = array(__( 'Azarbaijan - East', 'Persian_Gravityforms_By_HANNANStd' ),
|
447 |
-
__( 'Azarbaijan - West', 'Persian_Gravityforms_By_HANNANStd' ),
|
448 |
-
__( 'Ardabil', 'Persian_Gravityforms_By_HANNANStd' ),
|
449 |
-
__( 'Isfahan', 'Persian_Gravityforms_By_HANNANStd' ),
|
450 |
-
__( 'Alborz', 'Persian_Gravityforms_By_HANNANStd' ),
|
451 |
-
__( 'Ilam', 'Persian_Gravityforms_By_HANNANStd' ),
|
452 |
-
__( 'Bushehr', 'Persian_Gravityforms_By_HANNANStd' ),
|
453 |
-
__( 'Tehran', 'Persian_Gravityforms_By_HANNANStd' ),
|
454 |
-
__( 'Chahar Mahaal and Bakhtiari', 'Persian_Gravityforms_By_HANNANStd' ),
|
455 |
-
__( 'Khorasan - South', 'Persian_Gravityforms_By_HANNANStd' ),
|
456 |
-
__( 'Khorasan - Razavi', 'Persian_Gravityforms_By_HANNANStd' ),
|
457 |
-
__( 'Khorasan - North', 'Persian_Gravityforms_By_HANNANStd' ),
|
458 |
-
__( 'Khuzestan', 'Persian_Gravityforms_By_HANNANStd' ),
|
459 |
-
__( 'Zanjan', 'Persian_Gravityforms_By_HANNANStd' ),
|
460 |
-
__( 'Semnan', 'Persian_Gravityforms_By_HANNANStd' ),
|
461 |
-
__( 'Sistan and Baluchistan', 'Persian_Gravityforms_By_HANNANStd' ),
|
462 |
-
__( 'Fars', 'Persian_Gravityforms_By_HANNANStd' ),
|
463 |
-
__( 'Qazvin', 'Persian_Gravityforms_By_HANNANStd' ),
|
464 |
-
__( 'Qom', 'Persian_Gravityforms_By_HANNANStd' ),
|
465 |
-
__( 'Kurdistan', 'Persian_Gravityforms_By_HANNANStd' ),
|
466 |
-
__( 'Kerman', 'Persian_Gravityforms_By_HANNANStd' ),
|
467 |
-
__( 'Kermanshah', 'Persian_Gravityforms_By_HANNANStd' ),
|
468 |
-
__( 'Kohgiluyeh and Boyer-Ahmad', 'Persian_Gravityforms_By_HANNANStd' ),
|
469 |
-
__( 'Golestan', 'Persian_Gravityforms_By_HANNANStd' ),
|
470 |
-
__( 'Gilan', 'Persian_Gravityforms_By_HANNANStd' ),
|
471 |
-
__( 'Lorestan', 'Persian_Gravityforms_By_HANNANStd' ),
|
472 |
-
__( 'Mazandaran', 'Persian_Gravityforms_By_HANNANStd' ),
|
473 |
-
__( 'Markazi', 'Persian_Gravityforms_By_HANNANStd' ),
|
474 |
-
__( 'Hormozgān', 'Persian_Gravityforms_By_HANNANStd' ),
|
475 |
-
__( 'Hamadan', 'Persian_Gravityforms_By_HANNANStd' ),
|
476 |
-
__( 'Yazd', 'Persian_Gravityforms_By_HANNANStd' )
|
477 |
-
);
|
478 |
-
$month[__( 'Iranian Months', 'Persian_Gravityforms_By_HANNANStd' )] = array(
|
479 |
-
__( 'Farvardin', 'Persian_Gravityforms_By_HANNANStd' ),
|
480 |
-
__( 'Ordibehesht', 'Persian_Gravityforms_By_HANNANStd' ),
|
481 |
-
__( 'Khordad', 'Persian_Gravityforms_By_HANNANStd' ),
|
482 |
-
__( 'Tir', 'Persian_Gravityforms_By_HANNANStd' ),
|
483 |
-
__( 'Mordad', 'Persian_Gravityforms_By_HANNANStd' ),
|
484 |
-
__( 'Shahrivar', 'Persian_Gravityforms_By_HANNANStd' ),
|
485 |
-
__( 'Mehr', 'Persian_Gravityforms_By_HANNANStd' ),
|
486 |
-
__( 'Aban', 'Persian_Gravityforms_By_HANNANStd' ),
|
487 |
-
__( 'Azar', 'Persian_Gravityforms_By_HANNANStd' ),
|
488 |
-
__( 'Dey', 'Persian_Gravityforms_By_HANNANStd' ),
|
489 |
-
__( 'Bahman', 'Persian_Gravityforms_By_HANNANStd' ),
|
490 |
-
__( 'Esfand', 'Persian_Gravityforms_By_HANNANStd' )
|
491 |
-
);
|
492 |
-
return $choices = array_merge($states, $month, $choices);
|
493 |
-
}
|
494 |
-
public function Add_Merge_Tags_To_List_By_HANNANStd($form){ ?>
|
495 |
-
<script type="text/javascript">
|
496 |
-
gform.addFilter("gform_merge_tags", "add_merge_tags");
|
497 |
-
function add_merge_tags(mergeTags, elementId, hideAllFields, excludeFieldTypes, isPrepop, option){
|
498 |
-
mergeTags["custom"].tags.push({ tag: '{payment_gateway}', label: '<?php _e("Simple Payment Gateway", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
499 |
-
mergeTags["custom"].tags.push({ tag: '{payment_status}', label: '<?php _e("Simple Payment Status", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
500 |
-
mergeTags["custom"].tags.push({ tag: '{transaction_id}', label: '<?php _e("Simple Transaction ID", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
501 |
-
mergeTags["custom"].tags.push({ tag: '{payment_gateway_css}', label: '<?php _e("Styled Payment Gateway", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
502 |
-
mergeTags["custom"].tags.push({ tag: '{payment_status_css}', label: '<?php _e("Styled Payment Status", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
503 |
-
mergeTags["custom"].tags.push({ tag: '{transaction_id_css}', label: '<?php _e("Styled Transaction ID", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
504 |
-
mergeTags["custom"].tags.push({ tag: '{payment_pack}', label: '<?php _e("Styled Payment Pack", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
505 |
-
mergeTags["custom"].tags.push({ tag: '{rtl_start}', label: '<?php _e("RTL Start", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
506 |
-
mergeTags["custom"].tags.push({ tag: '{rtl_end}', label: '<?php _e("RTL End", "Persian_Gravityforms_By_HANNANStd") ?>' });
|
507 |
-
return mergeTags;
|
508 |
-
}
|
509 |
-
</script>
|
510 |
-
<?php
|
511 |
-
return $form;
|
512 |
-
}
|
513 |
-
function First_Column_Actions_By_HANNANStd($form_id, $field_id, $value, $lead, $query_string) {
|
514 |
-
$url = get_bloginfo("wpurl") . "/wp-admin/admin.php?page=gf_entries&view=entries&id=" . $form_id;
|
515 |
-
$gateway = gform_get_meta($lead["id"], "payment_gateway");
|
516 |
-
|
517 |
-
if(strtolower($lead["payment_status"]) == strtolower('Active') || strtolower($lead["payment_status"]) == strtolower('Actived')
|
518 |
-
|| strtolower($lead["payment_status"]) == strtolower('Paid') || strtolower($lead["payment_status"]) == strtolower('Complete') || strtolower($lead["payment_status"]) == strtolower('Completed')
|
519 |
-
) {
|
520 |
-
$color = '#008000';
|
521 |
-
$stat = "موفق";
|
522 |
-
}
|
523 |
-
else if(strtolower($lead["payment_status"]) == strtolower('Failed')) {
|
524 |
-
$color = '#FF0000';
|
525 |
-
$stat = "ناموفق";
|
526 |
-
}
|
527 |
-
else if(strtolower($lead["payment_status"]) == strtolower('Cancelled')) {
|
528 |
-
$color = '#FFA500';
|
529 |
-
$stat = "منصرف شده";
|
530 |
-
}
|
531 |
-
else {
|
532 |
-
$color = '#3399FF';
|
533 |
-
$stat = "معلق";
|
534 |
-
}
|
535 |
-
if ( !empty($lead["payment_status"]) ) {
|
536 |
-
|
537 |
-
echo '<a class="stat" href="'.$url.'&sort=0&dir=DESC&s=Processing&field_id=payment_status&operator=is" style="color:'.$color.';"> '.$stat.' </a>';
|
538 |
-
|
539 |
-
if ( !empty($gateway) )
|
540 |
-
echo ' - ';
|
541 |
-
}
|
542 |
-
|
543 |
-
if ( !empty($gateway) )
|
544 |
-
echo '<a class="stat" href="'.$url.'&sort=0&dir=DESC&s='.$gateway.'&field_id=payment_gateway&operator=is" style="color:#000000;"> '.$gateway.' </a>';
|
545 |
-
}
|
546 |
-
public function Update_Lead_No_Gateway_By_HANNANStd($lead, $form) {
|
547 |
-
$gateway = gform_get_meta($lead['id'], 'payment_gateway');
|
548 |
-
$method = $lead['payment_method'];
|
549 |
-
$product = self::get_product_price($form, $lead);
|
550 |
-
if (!isset($method) && !$gateway && !isset($lead["transaction_id"]) ) {
|
551 |
-
$lead["transaction_id"] = rand(100000000000000,999999999999999);
|
552 |
-
$lead["is_fulfilled"] = 0;
|
553 |
-
}
|
554 |
-
if ( ($product["yes"]==2) && !isset($method) && !$gateway ) {
|
555 |
-
$lead["payment_amount"] = $product["total"];
|
556 |
-
$lead["payment_date"] = gmdate('Y-m-d H:i:s');
|
557 |
-
$lead["is_fulfilled"] = 1;
|
558 |
-
$lead["payment_status"] = 'Paid';
|
559 |
-
}
|
560 |
-
$wp_session = WP_Session::get_instance();
|
561 |
-
wp_session_unset();
|
562 |
-
$wp_session['refid'] = $form["id"].$lead["id"];
|
563 |
-
@session_start();
|
564 |
-
$_SESSION["refid"] = $form["id"].$lead["id"];
|
565 |
-
GFAPI::update_entry($lead);
|
566 |
-
return $lead;
|
567 |
-
}
|
568 |
-
public function GformReplaceMergeTags_By_HANNANStd($text, $form, $lead, $url_encode, $esc_html, $nl2br, $format){
|
569 |
-
$gateway = gform_get_meta($lead['id'], 'payment_gateway');
|
570 |
-
$payment_status = '';
|
571 |
-
if ($lead['payment_status']=="Active" || $lead['payment_status']=="Paid")
|
572 |
-
$payment_status = __("Paid", "Persian_Gravityforms_By_HANNANStd");
|
573 |
-
if ($lead['payment_status']=="Failed")
|
574 |
-
$payment_status = __("Failed", "Persian_Gravityforms_By_HANNANStd");
|
575 |
-
if ($lead['payment_status']=="Cancelled")
|
576 |
-
$payment_status = __("Cancelled", "Persian_Gravityforms_By_HANNANStd");
|
577 |
-
$tags = array(
|
578 |
-
'{payment_gateway}',
|
579 |
-
'{transaction_id}',
|
580 |
-
'{payment_status}',
|
581 |
-
'{payment_gateway_css}',
|
582 |
-
'{transaction_id_css}',
|
583 |
-
'{payment_status_css}',
|
584 |
-
'{payment_pack}',
|
585 |
-
'{rtl_start}',
|
586 |
-
'{rtl_end}',
|
587 |
-
);
|
588 |
-
$values = array (
|
589 |
-
$gateway ? $gateway : '',
|
590 |
-
isset($lead['transaction_id']) ? $lead['transaction_id'] : '',
|
591 |
-
isset($lead['payment_status']) ? $payment_status : '',
|
592 |
-
$gateway ? '
|
593 |
-
<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA" style="border:1px solid #e9e9e9!important;">
|
594 |
-
<tr bgcolor="#EAF2FA">
|
595 |
-
<td colspan="2" style="padding:5px !important">
|
596 |
-
<font style="font-family:sans-serif;font-size:12px"><strong>'.__( 'Payment Gateway', 'Persian_Gravityforms_By_HANNANStd' ).'</strong></font>
|
597 |
-
</td>
|
598 |
-
</tr>
|
599 |
-
<tr bgcolor="#FFFFFF">
|
600 |
-
<td style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px">'.$gateway.'</font>
|
601 |
-
</td>
|
602 |
-
</tr>
|
603 |
-
</table>' : '',
|
604 |
-
isset($lead['transaction_id']) ? '
|
605 |
-
<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA" style="border:1px solid #e9e9e9!important;">
|
606 |
-
<tr bgcolor="#EAF2FA">
|
607 |
-
<td colspan="2" style="padding:5px !important">
|
608 |
-
<font style="font-family:sans-serif;font-size:12px"><strong>'.__( 'Transaction ID', 'Persian_Gravityforms_By_HANNANStd' ).'</strong></font>
|
609 |
-
</td>
|
610 |
-
</tr>
|
611 |
-
<tr bgcolor="#FFFFFF">
|
612 |
-
<td style="padding:5px !important">
|
613 |
-
<font style="font-family:sans-serif;font-size:12px">'.$lead['transaction_id'].'</font>
|
614 |
-
</td>
|
615 |
-
</tr>
|
616 |
-
</table>' : '',
|
617 |
-
isset($lead['payment_status']) ? '
|
618 |
-
<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA" style="border:1px solid #e9e9e9!important;">
|
619 |
-
<tr bgcolor="#EAF2FA">
|
620 |
-
<td colspan="2" style="padding:5px !important">
|
621 |
-
<font style="font-family:sans-serif;font-size:12px"><strong>'.__( 'Payment Status', 'Persian_Gravityforms_By_HANNANStd' ).'</strong></font>
|
622 |
-
</td>
|
623 |
-
</tr>
|
624 |
-
<tr bgcolor="#FFFFFF">
|
625 |
-
<td style="padding:5px !important">
|
626 |
-
<font style="font-family:sans-serif;font-size:12px">'.$payment_status.'</font>
|
627 |
-
</td>
|
628 |
-
</tr>
|
629 |
-
</table>' : '',
|
630 |
-
(isset($lead['transaction_id']) && $gateway && isset($lead['payment_status']) ) ? '
|
631 |
-
<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA" style="border:1px solid #e9e9e9!important;">
|
632 |
-
<tr>
|
633 |
-
<td style="font-size:14px;font-weight:bold;background-color:#eee;border-bottom:1px solid #dfdfdf;padding:7px 7px" colspan="2">
|
634 |
-
'.__( 'Payment Information', 'Persian_Gravityforms_By_HANNANStd' ).'
|
635 |
-
</td>
|
636 |
-
</tr>
|
637 |
-
<tr bgcolor="#EAF2FA">
|
638 |
-
<td colspan="2" style="padding:5px !important">
|
639 |
-
<font style="font-family:sans-serif;font-size:12px"><strong>'.__( 'Payment Gateway', 'Persian_Gravityforms_By_HANNANStd' ).'</strong></font>
|
640 |
-
</td>
|
641 |
-
</tr>
|
642 |
-
<tr bgcolor="#FFFFFF">
|
643 |
-
<td style="padding:5px !important">
|
644 |
-
<font style="font-family:sans-serif;font-size:12px">'.$gateway.'</font>
|
645 |
-
</td>
|
646 |
-
</tr>
|
647 |
-
<tr bgcolor="#EAF2FA">
|
648 |
-
<td colspan="2" style="padding:5px !important">
|
649 |
-
<font style="font-family:sans-serif;font-size:12px"><strong>'.__( 'Payment Status', 'Persian_Gravityforms_By_HANNANStd' ).'</strong></font>
|
650 |
-
</td>
|
651 |
-
</tr>
|
652 |
-
<tr bgcolor="#FFFFFF">
|
653 |
-
<td style="padding:5px !important">
|
654 |
-
<font style="font-family:sans-serif;font-size:12px">'.$payment_status.'</font>
|
655 |
-
</td>
|
656 |
-
</tr>
|
657 |
-
<tr bgcolor="#EAF2FA">
|
658 |
-
<td colspan="2" style="padding:5px !important">
|
659 |
-
<font style="font-family:sans-serif;font-size:12px"><strong>'.__( 'Transaction ID', 'Persian_Gravityforms_By_HANNANStd' ).'</strong></font>
|
660 |
-
</td>
|
661 |
-
</tr>
|
662 |
-
<tr bgcolor="#FFFFFF">
|
663 |
-
<td style="padding:5px !important"><font style="font-family:sans-serif;font-size:12px">'.$lead['transaction_id'].'</font>
|
664 |
-
</td>
|
665 |
-
</tr>
|
666 |
-
</table>' : '',
|
667 |
-
|
668 |
-
'<div style="text-align: right !important; direction: rtl !important;">',
|
669 |
-
'</div>',
|
670 |
-
);
|
671 |
-
$text = str_replace($tags, $values, $text);
|
672 |
-
return $text;
|
673 |
-
}
|
674 |
-
public function Add_RTL_Style_To_Footer_By_HANNANStd() {
|
675 |
-
|
676 |
-
if( is_rtl() ) {
|
677 |
-
echo '<style type="text/css">
|
678 |
-
.gright,.gform_wrapper form ,.gform_wrapper ul li:before, .gform_wrapper ul li:after, .gform_wrapper ul.gform_fields {
|
679 |
-
text-align: right !important;
|
680 |
-
direction:rtl !important;
|
681 |
-
}
|
682 |
-
.gleft,.gform_wrapper input[type="url"], .gform_wrapper input[type="email"],
|
683 |
-
.gform_wrapper input[type="tel"], .gform_wrapper input[type="number"],
|
684 |
-
.gform_wrapper input[type="password"],body.rtl .gform_wrapper input[type="email"], body.rtl .gform_wrapper input[type="password"],
|
685 |
-
body.rtl .gform_wrapper input[type="url"], body.rtl .gform_wrapper input[type="tel"],body .gform_wrapper.gf_rtl_wrapper input[type="email"],
|
686 |
-
body .gform_wrapper.gf_rtl_wrapper input[type="password"], body .gform_wrapper.gf_rtl_wrapper input[type="url"], body .gform_wrapper.gf_rtl_wrapper input[type="tel"] {
|
687 |
-
text-align:left !important;
|
688 |
-
direction:ltr !important;
|
689 |
-
}
|
690 |
-
.gform_wrapper .ginput_complex .ginput_left {
|
691 |
-
float: right !important;
|
692 |
-
}
|
693 |
-
.gform_wrapper .ginput_complex .ginput_right {
|
694 |
-
float: left !important;
|
695 |
-
}
|
696 |
-
.gform_wrapper .gfield_checkbox li label,
|
697 |
-
.gform_wrapper .gfield_radio li label {
|
698 |
-
margin-right:20px !important;
|
699 |
-
}
|
700 |
-
.gform_wrapper .ginput_complex.ginput_container.has_first_name.has_middle_name.has_last_name span.name_first,
|
701 |
-
.gform_wrapper .ginput_complex.ginput_container.has_first_name.has_middle_name.has_last_name span.name_middle,
|
702 |
-
.gform_wrapper .ginput_complex.ginput_container.has_first_name.no_middle_name.has_last_name span.name_first{
|
703 |
-
margin-right:0px !important;
|
704 |
-
margin-left: 1.3% !important;
|
705 |
-
}
|
706 |
-
</style>';
|
707 |
-
}
|
708 |
-
}
|
709 |
-
public function Add_Styles_Print_By_HANNANStd($value, $form){
|
710 |
-
if( is_rtl() ) {
|
711 |
-
wp_register_style('print_entry', plugins_url ( '/assets/css/printer.css', __FILE__, true ) );
|
712 |
-
return array('print_entry');
|
713 |
-
}
|
714 |
-
}
|
715 |
-
public function GravityForms_Admin_Script_Css_By_HANNANStd() {
|
716 |
-
if(!class_exists('GFForms'))
|
717 |
-
return;
|
718 |
-
$current_page = trim(strtolower(RGForms::get("page")));
|
719 |
-
$page_prefix = explode("_", $current_page);
|
720 |
-
if ( isset($_GET['page']) )
|
721 |
-
$is_gravityforms_page = (substr($_GET['page'],0,12) == 'gravityforms') ? 1 : 0;
|
722 |
-
else
|
723 |
-
$is_gravityforms_page = 0;
|
724 |
-
if ( is_rtl() && ($page_prefix[0]=="gf" || RGForms::is_gravity_page() || $is_gravityforms_page == 1 )) {
|
725 |
-
wp_enqueue_style('Persian_GravityForms', plugins_url ( '/assets/css/admin.css', __FILE__, null, GFCommon::$version ) );
|
726 |
-
wp_print_styles('gform_tooltip','Persian_GravityForms' );
|
727 |
-
wp_dequeue_script('jquery-ui-datepicker');
|
728 |
-
wp_dequeue_script(array("jquery-ui-datepicker"));
|
729 |
-
// wp_deregister_script('jquery-ui-datepicker');
|
730 |
-
wp_deregister_script(array("jquery-ui-datepicker"));
|
731 |
-
wp_deregister_script('gform_datepicker_init');
|
732 |
-
wp_enqueue_script('gform_datepicker_init', plugins_url ( '/assets/js/wp-admin-datepicker.js', __FILE__), array( 'jquery', 'jquery-ui-core' ), true );
|
733 |
-
echo '<style type="text/css">
|
734 |
-
.mt-gform_notification_message,
|
735 |
-
.mt-form_confirmation_message {
|
736 |
-
margin-right: -30px !important;
|
737 |
-
}
|
738 |
-
</style>';
|
739 |
-
}
|
740 |
-
}
|
741 |
-
|
742 |
-
public function Gravity_Form_Admin_Footer_By_HANNANStd(){ ?>
|
743 |
-
<script type="text/javascript">
|
744 |
-
var GF_Licence = jQuery.noConflict();
|
745 |
-
GF_Licence(document).ready(function(){
|
746 |
-
GF_Licence('img').each( function() {
|
747 |
-
var title = GF_Licence(this).prop('title');
|
748 |
-
var alt = GF_Licence(this).prop('alt');
|
749 |
-
if ( typeof title !== 'undefined' && 0 != title.length && ( title == 'Unlicensed Copy' || title == 'Unlicensed Copy. Please purchase a Gravity Forms license' )
|
750 |
-
|| typeof alt !== 'undefined' && 0 != alt.length && ( alt == 'Unlicensed Copy' || alt == 'Unlicensed Copy. Please purchase a Gravity Forms license' ) ) {
|
751 |
-
GF_Licence(this).hide();
|
752 |
-
}
|
753 |
-
});
|
754 |
-
});
|
755 |
-
</script>
|
756 |
-
<?php
|
757 |
-
}
|
758 |
-
|
759 |
-
public function Register_Script_to_No_Conflict_By_HANNANStd($scripts){
|
760 |
-
$scripts[] = "gform_datepicker_init";
|
761 |
-
return $scripts;
|
762 |
-
}
|
763 |
-
public function Register_Style_to_No_Conflict_By_HANNANStd($styles){
|
764 |
-
$styles[] = "Persian_GravityForms";
|
765 |
-
$styles[] = "print_entry";
|
766 |
-
return $styles;
|
767 |
-
}
|
768 |
-
public function Persian_GravityForms_Dashboard_By_HANNANStd() {
|
769 |
-
if ( !current_user_can('manage_options') )
|
770 |
-
return;
|
771 |
-
global $wp_meta_boxes;
|
772 |
-
wp_add_dashboard_widget('persiangf_wd_hannanstd', __( 'Persian Gravity Forms Dashboard', 'Persian_Gravityforms_By_HANNANStd' ) , array( $this, 'Persian_GravityForms_Widget_By_HANNANStd'));
|
773 |
-
}
|
774 |
-
public static function Persian_GravityForms_Widget_By_HANNANStd() {
|
775 |
-
global $_wp_admin_css_colors;
|
776 |
-
$current_color = get_user_option( 'admin_color' );
|
777 |
-
$colors = array();
|
778 |
-
foreach ( $_wp_admin_css_colors as $color => $color_info ) {
|
779 |
-
if ($color == $current_color){
|
780 |
-
foreach ( $color_info->colors as $html_color ) {
|
781 |
-
$colors[] = esc_attr( $html_color );
|
782 |
-
}
|
783 |
-
}
|
784 |
-
}
|
785 |
-
if (get_bloginfo('version')>=3.8) {
|
786 |
-
?>
|
787 |
-
<style>
|
788 |
-
#persiangf_wd_hannanstd h3{font-family:byekan !important;background:<?php echo $colors[1] ?> !important;color:#fff !important;}
|
789 |
-
#persiangf_wd_hannanstd .handlediv{color:#fff !important;}
|
790 |
-
#persiangf_wd_hannanstd .a1{font-family:byekan !important;}
|
791 |
-
#persiangf_wd_hannanstd .a2{font-family:byekan !important;font-size:12px !important;}
|
792 |
-
</style>
|
793 |
-
<?php
|
794 |
-
}
|
795 |
-
$rss = fetch_feed( "http://gravityforms.ir/feed/" );
|
796 |
-
if ( is_wp_error($rss) ) {
|
797 |
-
if ( is_admin() || current_user_can('manage_options') ) {
|
798 |
-
printf(__('<strong>RSS Error</strong>', 'Persian_Gravityforms_By_HANNANStd'));
|
799 |
-
}
|
800 |
-
return;
|
801 |
-
}
|
802 |
-
if ( !$rss->get_item_quantity() ) {
|
803 |
-
printf(__( 'Apparently, There are no updates to show!', 'Persian_Gravityforms_By_HANNANStd' ));
|
804 |
-
$rss->__destruct();
|
805 |
-
unset($rss);
|
806 |
-
return;
|
807 |
-
}
|
808 |
-
echo "<ul>";
|
809 |
-
if ( !isset($items) )
|
810 |
-
$items = 5;
|
811 |
-
$i=1;
|
812 |
-
foreach ( $rss->get_items(0, $items) as $item ) {
|
813 |
-
$publisher = '';
|
814 |
-
$site_link = '';
|
815 |
-
$link = '';
|
816 |
-
$content = '';
|
817 |
-
$date = '';
|
818 |
-
$link = esc_url( strip_tags( $item->get_link() ) );
|
819 |
-
$title = esc_html( $item->get_title() );
|
820 |
-
$content = $item->get_content();
|
821 |
-
$content = wp_html_excerpt($content, 250) . ' ...';
|
822 |
-
echo "<li>";
|
823 |
-
if ($i==1)
|
824 |
-
echo "<a class='rsswidget a1' href='$link'>$title</a><div class='rssSummary'>$content</div><hr/>";
|
825 |
-
else
|
826 |
-
echo "<a class='rsswidget a2' href='$link'>$title</a>";
|
827 |
-
echo "</li>";
|
828 |
-
$i++;
|
829 |
-
}
|
830 |
-
echo "</ul>";
|
831 |
-
$rss->__destruct();
|
832 |
-
unset($rss);
|
833 |
-
}
|
834 |
-
public static function get_product_price($form, $entry){
|
835 |
-
$currency = GFCommon::get_currency();
|
836 |
-
$products = GFCommon::get_product_fields($form, $entry, true);
|
837 |
-
$product_index = 1;
|
838 |
-
$total = 0;
|
839 |
-
$discount = 0;
|
840 |
-
$price = 0;
|
841 |
-
foreach($products["products"] as $product){
|
842 |
-
$option_fields = "";
|
843 |
-
$price = GFCommon::to_number($product["price"]);
|
844 |
-
if(is_array(rgar($product,"options"))){
|
845 |
-
$option_index = 1;
|
846 |
-
foreach($product["options"] as $option){
|
847 |
-
$field_label = urlencode($option["field_label"]);
|
848 |
-
$option_name = urlencode($option["option_name"]);
|
849 |
-
$option_fields .= "&on{$option_index}_{$product_index}={$field_label}&os{$option_index}_{$product_index}={$option_name}";
|
850 |
-
$price += GFCommon::to_number($option["price"]);
|
851 |
-
$option_index++;
|
852 |
-
}
|
853 |
-
}
|
854 |
-
$name = urlencode($product["name"]);
|
855 |
-
if($price > 0)
|
856 |
-
{
|
857 |
-
$total += $price * $product['quantity'];
|
858 |
-
$product_index++;
|
859 |
-
}
|
860 |
-
else{
|
861 |
-
$discount += abs($price) * $product['quantity'];
|
862 |
-
}
|
863 |
-
}
|
864 |
-
if($price) $yes = 2;
|
865 |
-
else $yes = 1;
|
866 |
-
if(!empty($products["shipping"]["price"])) {
|
867 |
-
$total += floatval($products["shipping"]["price"]);
|
868 |
-
}
|
869 |
-
if($discount > 0){
|
870 |
-
if($discount < $total) {
|
871 |
-
$total = $total-$discount;
|
872 |
-
}
|
873 |
-
else {
|
874 |
-
$total = 0;
|
875 |
-
}
|
876 |
-
}
|
877 |
-
else {
|
878 |
-
$total = $total;
|
879 |
-
}
|
880 |
-
return array("total" => $total, "yes" => $yes);
|
881 |
-
}
|
882 |
-
public static function get_mysql_tz_offset(){
|
883 |
-
$tz = get_option('gmt_offset');
|
884 |
-
if ( intval($tz) < 0)
|
885 |
-
$pf = "-";
|
886 |
-
else
|
887 |
-
$pf = "+";
|
888 |
-
$tz = abs($tz) * 3600;
|
889 |
-
$tz = gmdate("H:i", $tz);
|
890 |
-
$tz = $pf.$tz;
|
891 |
-
$today = date('Y-m-d H:i:s');
|
892 |
-
$date = new DateTime($today);
|
893 |
-
$tzb = get_option('gmt_offset');
|
894 |
-
$tzn = abs($tzb) * 3600;
|
895 |
-
$tzh = intval(gmdate("H", $tzn));
|
896 |
-
$tzm = intval(gmdate("i", $tzn));
|
897 |
-
if ( intval($tzb) < 0) {
|
898 |
-
$date->sub(new DateInterval('P0DT'.$tzh.'H'.$tzm.'M'));
|
899 |
-
}
|
900 |
-
else
|
901 |
-
{
|
902 |
-
$date->add(new DateInterval('P0DT'.$tzh.'H'.$tzm.'M'));}
|
903 |
-
$today = $date->format('Y-m-d H:i:s');
|
904 |
-
$today = strtotime ($today);
|
905 |
-
return array("tz" => $tz, "today" => $today);
|
906 |
-
}
|
907 |
-
public static function get_base_url(){
|
908 |
-
return plugins_url( '', __FILE__ );
|
909 |
-
}
|
910 |
-
public function version(){
|
911 |
-
return '1.8.0';
|
912 |
-
}
|
913 |
-
public function Add_HANNANStd_Field_By_HANNANStd( $field_groups ) {
|
914 |
-
foreach( $field_groups as &$group ){
|
915 |
-
if( $group["name"] == "advanced_fields" ){
|
916 |
-
$group["fields"][] = array(
|
917 |
-
"class"=>"button",
|
918 |
-
"value" => "کد ملی",
|
919 |
-
"onclick" => "StartAddField('mellicart');"
|
920 |
-
);
|
921 |
-
/*
|
922 |
-
$group["fields"][] = array(
|
923 |
-
"class"=>"button",
|
924 |
-
"value" => "کیبورد",
|
925 |
-
"onclick" => "StartAddField('keyboard');"
|
926 |
-
);
|
927 |
-
*/
|
928 |
-
break;
|
929 |
-
}
|
930 |
-
}
|
931 |
-
return $field_groups;
|
932 |
-
}
|
933 |
-
public function Add_HANNANStd_Field_Title_By_HANNANStd($type) {
|
934 |
-
if ($type == 'mellicart') {
|
935 |
-
return 'کد ملی';
|
936 |
-
}
|
937 |
-
// if ($type == 'keyboard') {
|
938 |
-
// return 'کیبورد';
|
939 |
-
// }
|
940 |
-
}
|
941 |
-
public function Add_HANNANStd_Field_Label_By_HANNANStd(){
|
942 |
-
?>
|
943 |
-
case "mellicart" :
|
944 |
-
field.label = 'کد ملی';
|
945 |
-
break;
|
946 |
-
<?php /*
|
947 |
-
case "keyboard" :
|
948 |
-
field.label = 'کیبورد';
|
949 |
-
break;
|
950 |
-
<?php
|
951 |
-
*/
|
952 |
-
}
|
953 |
-
public function Add_Melli_Cart_Field_Input_By_HANNANStd($input, $field, $value, $lead_id, $form_id ){
|
954 |
-
if ( $field["type"] == "mellicart" ) {
|
955 |
-
$id = $field["id"];
|
956 |
-
$field_id = IS_ADMIN || $form_id == 0 ? "input_$id" : "input_" . $form_id . "_$id";
|
957 |
-
$form_id = IS_ADMIN && empty($form_id) ? rgget("id") : $form_id;
|
958 |
-
$size = rgar($field, "size");
|
959 |
-
$disabled_text = (IS_ADMIN && RG_CURRENT_VIEW != "entry") ? "disabled='disabled'" : "";
|
960 |
-
$class_suffix = RG_CURRENT_VIEW == "entry" ? "_admin" : "";
|
961 |
-
$class = $size . $class_suffix;
|
962 |
-
$currency = "";
|
963 |
-
if(RG_CURRENT_VIEW == "entry")
|
964 |
-
{
|
965 |
-
$lead = RGFormsModel::get_lead($lead_id);
|
966 |
-
$post_id = $lead["post_id"];
|
967 |
-
|
968 |
-
}
|
969 |
-
|
970 |
-
$placeholder_attribute = GFCommon::get_field_placeholder_attribute( $field );
|
971 |
-
$max_length = "";
|
972 |
-
$html5_attributes = "";
|
973 |
-
if(empty($html_input_type))
|
974 |
-
$html_input_type = "text";
|
975 |
-
$max_length = "maxlength=10";
|
976 |
-
$tabindex = GFCommon::get_tabindex();
|
977 |
-
return sprintf("<div class='ginput_container'>
|
978 |
-
<input onblur='MelliCard_Checker_Javascript_By_HANNANStd_%d(this);' name='input_%d' id='%s' type='%s' value='%s' class='melli_cart %s' $placeholder_attribute $max_length $tabindex $html5_attributes %s/>
|
979 |
-
</div><p class='city mellicart' id='city_%d'></p>", $id, $id, $field_id, $html_input_type, esc_attr($value), esc_attr($class), $disabled_text, $id);
|
980 |
-
}
|
981 |
-
if ( $field["type"] == "keyboard" ) {
|
982 |
-
$id = $field["id"];
|
983 |
-
$field_id = IS_ADMIN || $form_id == 0 ? "input_$id" : "input_" . $form_id . "_$id";
|
984 |
-
$form_id = IS_ADMIN && empty($form_id) ? rgget("id") : $form_id;
|
985 |
-
|
986 |
-
if(RG_CURRENT_VIEW == "entry")
|
987 |
-
{
|
988 |
-
$lead = RGFormsModel::get_lead($lead_id);
|
989 |
-
$post_id = $lead["post_id"];
|
990 |
-
}
|
991 |
-
return sprintf("<input name='input_%d' id='%s' type='hidden' value=''/>", $id, $id);
|
992 |
-
}
|
993 |
-
return $input;
|
994 |
-
}
|
995 |
-
public function Mellicart_Pre_Submission_By_HANNANStd( $form ) {
|
996 |
-
$mellicart_fields = GFCommon::get_fields_by_type( $form, array( 'mellicart' ) );
|
997 |
-
foreach ( (array) $mellicart_fields as $field ) {
|
998 |
-
$input_name = "input_{$field['id']}";
|
999 |
-
$input_value = ! rgempty( $input_name ) ? rgpost( $input_name ) : "";
|
1000 |
-
if ( !empty( $input_value ) ) {
|
1001 |
-
if (strlen($input_value) == 8 )
|
1002 |
-
$_POST[ "input_{$field['id']}" ] = '00'.$input_value;
|
1003 |
-
elseif (strlen($input_value) == 9 )
|
1004 |
-
$_POST[ "input_{$field['id']}" ] = '0'.$input_value;
|
1005 |
-
else
|
1006 |
-
$_POST[ "input_{$field['id']}" ] = $input_value;
|
1007 |
-
}
|
1008 |
-
}
|
1009 |
-
}
|
1010 |
-
public function Add_Melli_Cart_Field_Setting_By_HANNANStd( $position, $form_id ){
|
1011 |
-
if( $position == 50 ){
|
1012 |
-
?>
|
1013 |
-
<li class="mellicart_setting field_setting">
|
1014 |
-
<hr/>
|
1015 |
-
<input type="checkbox" id="field_mellicart" onclick="SetFieldProperty('field_mellicart', this.checked);" />
|
1016 |
-
<label for="field_mellicart" class="inline">
|
1017 |
-
<?php _e("نمایش زیر نویس فیلد", "Persian_Gravityforms_By_HANNANStd"); ?>
|
1018 |
-
<?php gform_tooltip("form_field_mellicart"); ?>
|
1019 |
-
</label>
|
1020 |
-
<br/>
|
1021 |
-
<input type="checkbox" id="field_mellicart_sp" onclick="SetFieldProperty('field_mellicart_sp', this.checked);" />
|
1022 |
-
<label for="field_mellicart_sp" class="inline">
|
1023 |
-
<?php _e("جدا سازی خودکار ارقام توسط خط فاصله", "Persian_Gravityforms_By_HANNANStd"); ?>
|
1024 |
-
<?php gform_tooltip("form_field_mellicart_sp"); ?>
|
1025 |
-
</label>
|
1026 |
-
<br/>
|
1027 |
-
<hr/>
|
1028 |
-
<label class="inline">
|
1029 |
-
<?php _e("متن پیغام خطا هنگامی که موارد زیر رخ دهد", "Persian_Gravityforms_By_HANNANStd"); ?>
|
1030 |
-
<?php gform_tooltip("form_field_mellicart_header"); ?>
|
1031 |
-
</label>
|
1032 |
-
<br/>
|
1033 |
-
<br/>
|
1034 |
-
<label for="field_mellicart_sp1" class="inline">
|
1035 |
-
<?php _e("مقدار وارد شده شامل کاراکتر غیر عددی باشد", "Persian_Gravityforms_By_HANNANStd"); ?>
|
1036 |
-
<?php gform_tooltip("form_field_mellicart_sp1"); ?>
|
1037 |
-
</label>
|
1038 |
-
<br/>
|
1039 |
-
<input type="text" id="field_mellicart_sp1" size="35" onkeyup="SetFieldProperty('field_mellicart_sp1', this.value);" />
|
1040 |
-
<br/>
|
1041 |
-
<label for="field_mellicart_sp2" class="inline">
|
1042 |
-
<?php _e("تعداد ارقام وارد شده استاندارد نباشد", "Persian_Gravityforms_By_HANNANStd"); ?>
|
1043 |
-
<?php gform_tooltip("form_field_mellicart_sp2"); ?>
|
1044 |
-
</label>
|
1045 |
-
<br/>
|
1046 |
-
<input type="text" id="field_mellicart_sp2" size="35" onkeyup="SetFieldProperty('field_mellicart_sp2', this.value);" />
|
1047 |
-
<br/>
|
1048 |
-
<label for="field_mellicart_sp3" class="inline">
|
1049 |
-
<?php _e("کد ملی وارد شده قبلا ثبت شده باشد", "Persian_Gravityforms_By_HANNANStd"); ?>
|
1050 |
-
<?php gform_tooltip("form_field_mellicart_sp3"); ?>
|
1051 |
-
</label>
|
1052 |
-
<br/>
|
1053 |
-
<input type="text" id="field_mellicart_sp3" size="35" onkeyup="SetFieldProperty('field_mellicart_sp3', this.value);" />
|
1054 |
-
<br/>
|
1055 |
-
<label for="field_mellicart_sp4" class="inline">
|
1056 |
-
<?php _e("کد ملی وارد شده مطابق با الگوی ملی نباشد", "Persian_Gravityforms_By_HANNANStd"); ?>
|
1057 |
-
<?php gform_tooltip("form_field_mellicart_sp4"); ?>
|
1058 |
-
</label>
|
1059 |
-
<br/>
|
1060 |
-
<input type="text" id="field_mellicart_sp4" size="35" onkeyup="SetFieldProperty('field_mellicart_sp4', this.value);" />
|
1061 |
-
<hr/>
|
1062 |
-
</li>
|
1063 |
-
<?php
|
1064 |
-
}
|
1065 |
-
}
|
1066 |
-
public function Add_Melli_Cart_Field_Class_By_HANNANStd($classes, $field, $form){
|
1067 |
-
if( $field["type"] == "mellicart" ){
|
1068 |
-
$classes .= " gform_mellicart";
|
1069 |
-
}
|
1070 |
-
return $classes;
|
1071 |
-
}
|
1072 |
-
public function Add_Melli_Cart_PHP_Checker_By_HANNANStd($meli_code='',$setting){
|
1073 |
-
if (!empty($meli_code)) {
|
1074 |
-
if ($setting == 1) {
|
1075 |
-
$meli_code = str_replace('-','',$meli_code);
|
1076 |
-
}
|
1077 |
-
if($meli_code == '1111111111' ||
|
1078 |
-
$meli_code == '0000000000' ||
|
1079 |
-
$meli_code == '2222222222' ||
|
1080 |
-
$meli_code == '3333333333' ||
|
1081 |
-
$meli_code == '4444444444' ||
|
1082 |
-
$meli_code == '5555555555' ||
|
1083 |
-
$meli_code == '6666666666' ||
|
1084 |
-
$meli_code == '7777777777' ||
|
1085 |
-
$meli_code == '8888888888' ||
|
1086 |
-
$meli_code == '9999999999')
|
1087 |
-
{
|
1088 |
-
return 2;
|
1089 |
-
}
|
1090 |
-
if(!is_numeric($meli_code))
|
1091 |
-
return 4;
|
1092 |
-
$meli_code = (string) preg_replace('/[^0-9]/','',$meli_code);
|
1093 |
-
if(strlen($meli_code)>10 or strlen($meli_code)<8)
|
1094 |
-
return 3;
|
1095 |
-
if(strlen($meli_code)==8)
|
1096 |
-
$meli_code = "00".$meli_code;
|
1097 |
-
if(strlen($meli_code)==9)
|
1098 |
-
$meli_code = "0".$meli_code;
|
1099 |
-
$list_code = str_split($meli_code);
|
1100 |
-
$last = (int) $list_code[9];
|
1101 |
-
unset($list_code[9]);
|
1102 |
-
$i = 10;
|
1103 |
-
$sum = 0;
|
1104 |
-
foreach($list_code as $key=>$_)
|
1105 |
-
{
|
1106 |
-
$sum += intval($_) * $i;$i--;
|
1107 |
-
}
|
1108 |
-
$mod =(int) $sum % 11;
|
1109 |
-
if($mod >= 2)
|
1110 |
-
$mod = 11 - $mod;
|
1111 |
-
if ($mod != $last)
|
1112 |
-
return 2;
|
1113 |
-
else
|
1114 |
-
return 1;
|
1115 |
-
}
|
1116 |
-
return;
|
1117 |
-
}
|
1118 |
-
public function Add_Melli_Cart_Field_JavaScript_Checker_By_HANNANStd($content, $field, $value, $lead_id, $form_id){
|
1119 |
-
if ( $field["type"] == "mellicart" && (rgget("field_mellicart", $field) || rgget("field_mellicart_sp", $field) ) && !IS_ADMIN )
|
1120 |
-
{
|
1121 |
-
$pm1= rgget("field_mellicart_sp1", $field);
|
1122 |
-
$pm2= rgget("field_mellicart_sp2", $field);
|
1123 |
-
$pm3= rgget("field_mellicart_sp4", $field);
|
1124 |
-
?>
|
1125 |
-
<script>
|
1126 |
-
function MelliCard_Checker_Javascript_By_HANNANStd_<?php echo $field["id"]; ?>(meli_code) {
|
1127 |
-
if (meli_code.value == '')
|
1128 |
-
{
|
1129 |
-
return false;
|
1130 |
-
}
|
1131 |
-
<?php
|
1132 |
-
if(rgget("field_mellicart_sp", $field)) { ?>
|
1133 |
-
meli_code.value = meli_code.value.replace("-", "").replace("-", "");
|
1134 |
-
<?php
|
1135 |
-
}
|
1136 |
-
if(rgget("field_mellicart", $field)) {?>
|
1137 |
-
if (isNaN(meli_code.value)) {
|
1138 |
-
<?php
|
1139 |
-
if ($pm1)
|
1140 |
-
{
|
1141 |
-
?>
|
1142 |
-
var pm1 = "<?php echo $pm1 ?>";
|
1143 |
-
<?php
|
1144 |
-
}
|
1145 |
-
else
|
1146 |
-
{ ?>
|
1147 |
-
var pm1 = "کد ملی فقط باید به صورت عدد وارد شود . ";
|
1148 |
-
<?php
|
1149 |
-
} ?>
|
1150 |
-
document.getElementById("city_<?php echo $field["id"]; ?>").innerHTML = pm1;
|
1151 |
-
return false;
|
1152 |
-
}
|
1153 |
-
if (meli_code.value == '0000000000' ||
|
1154 |
-
meli_code.value == '1111111111' ||
|
1155 |
-
meli_code.value == '2222222222' ||
|
1156 |
-
meli_code.value == '3333333333' ||
|
1157 |
-
meli_code.value == '4444444444' ||
|
1158 |
-
meli_code.value == '5555555555' ||
|
1159 |
-
meli_code.value == '6666666666' ||
|
1160 |
-
meli_code.value == '7777777777' ||
|
1161 |
-
meli_code.value == '8888888888' ||
|
1162 |
-
meli_code.value == '9999999999') {
|
1163 |
-
<?php
|
1164 |
-
if ($pm3)
|
1165 |
-
{
|
1166 |
-
?>
|
1167 |
-
var pm3 = "<?php echo $pm3 ?>";
|
1168 |
-
<?php
|
1169 |
-
}
|
1170 |
-
else
|
1171 |
-
{
|
1172 |
-
?>
|
1173 |
-
var pm3 = 'کد ملی وارد شده مطابق با استانداردهای کشور نمی باشد .';
|
1174 |
-
<?php
|
1175 |
-
}
|
1176 |
-
?>
|
1177 |
-
document.getElementById("city_<?php echo $field["id"]; ?>").innerHTML = pm3;
|
1178 |
-
return false;
|
1179 |
-
}
|
1180 |
-
if (meli_code.value.length > 10 || meli_code.value.length < 8)
|
1181 |
-
{
|
1182 |
-
<?php
|
1183 |
-
if ($pm2)
|
1184 |
-
{
|
1185 |
-
?>
|
1186 |
-
var pm2 = "<?php echo $pm2 ?>";
|
1187 |
-
<?php
|
1188 |
-
}
|
1189 |
-
else
|
1190 |
-
{
|
1191 |
-
?>
|
1192 |
-
var pm2 = 'کد ملی می بایست 10 رقمی باشد . تنها در صورتی مجاز به استفاده از کد های 8 یا 9 رقمی هستید که ارقام سمت چپ 0 باشند . ';
|
1193 |
-
<?php
|
1194 |
-
}
|
1195 |
-
?>
|
1196 |
-
document.getElementById("city_<?php echo $field["id"]; ?>").innerHTML = pm2;
|
1197 |
-
return false;
|
1198 |
-
}
|
1199 |
-
<?php
|
1200 |
-
}
|
1201 |
-
?>
|
1202 |
-
if (meli_code.value.length == 8) {
|
1203 |
-
meli_code.value = "00"+meli_code.value;
|
1204 |
-
}
|
1205 |
-
if (meli_code.value.length == 9) {
|
1206 |
-
meli_code.value = "0"+meli_code.value;
|
1207 |
-
}
|
1208 |
-
city = meli_code.value.substring(0,3);
|
1209 |
-
c = parseInt(meli_code.value.charAt(9));
|
1210 |
-
n = parseInt(meli_code.value.charAt(0)) * 10 +
|
1211 |
-
parseInt(meli_code.value.charAt(1)) * 9 +
|
1212 |
-
parseInt(meli_code.value.charAt(2)) * 8 +
|
1213 |
-
parseInt(meli_code.value.charAt(3)) * 7 +
|
1214 |
-
parseInt(meli_code.value.charAt(4)) * 6 +
|
1215 |
-
parseInt(meli_code.value.charAt(5)) * 5 +
|
1216 |
-
parseInt(meli_code.value.charAt(6)) * 4 +
|
1217 |
-
parseInt(meli_code.value.charAt(7)) * 3 +
|
1218 |
-
parseInt(meli_code.value.charAt(8)) * 2;
|
1219 |
-
r = n - parseInt(n / 11) * 11;
|
1220 |
-
if ((r == 0 && r == c) || (r == 1 && c == 1) || (r > 1 && c == 11 - r))
|
1221 |
-
{
|
1222 |
-
<?php
|
1223 |
-
if(rgget("field_mellicart", $field))
|
1224 |
-
{
|
1225 |
-
?>
|
1226 |
-
if(city=="169")cityN="استان آذربايجان شرقي - شهر آذر شهر";if(city=="170")cityN="استان آذربايجان شرقي - شهر اسکو";if(city=="149"||city=="150")cityN="استان آذربايجان شرقي - شهر اهر";if(city=="171")cityN="استان آذربايجان شرقي - شهر بستان آباد";if(city=="168")cityN="استان آذربايجان شرقي - شهر بناب";if(city=="136"||city=="137"||city=="138")cityN="استان آذربايجان شرقي - شهر تبريز";if(city=="545")cityN="استان آذربايجان شرقي - شهر ترکمانچاي";if(city=="505")cityN="استان آذربايجان شرقي - شهر جلفا";if(city=="636")cityN="استان آذربايجان شرقي - شهر چاروايماق";if(city=="164"||city=="165")cityN="استان آذربايجان شرقي - شهر سراب";if(city=="172")cityN="استان آذربايجان شرقي - شهر شبستر";if(city=="623")cityN="استان آذربايجان شرقي - شهر صوفيان";if(city=="506")cityN="استان آذربايجان شرقي - شهر عجب شير";if(city=="519")cityN="استان آذربايجان شرقي - شهر کليبر";if(city=="154"||city=="155")cityN="استان آذربايجان شرقي - شهر مراغه";if(city=="567")cityN="استان آذربايجان شرقي - شهر ورزقان";if(city=="173")cityN="استان آذربايجان شرقي - شهر هريس";if(city=="159"||city=="160")cityN="استان آذربايجان شرقي - شهر هشترود";if(city=="604")cityN="استان آذربايجان شرقي - شهر هوراند";if(city=="274"||city=="275")cityN="استان آذربايجان غربي - شهر اروميه";if(city=="295")cityN="استان آذربايجان غربي - شهر اشنويه";if(city=="637")cityN="استان آذربايجان غربي - شهر انزل";if(city=="292")cityN="استان آذربايجان غربي - شهر بوکان";if(city=="492")cityN="استان آذربايجان غربي - شهر پلدشت";if(city=="289")cityN="استان آذربايجان غربي - شهر پيرانشهر";if(city=="677")cityN="استان آذربايجان غربي - شهر تخت سليمان";if(city=="294")cityN="استان آذربايجان غربي - شهر تکاب";if(city=="493")cityN="استان آذربايجان غربي - شهر چايپاره";if(city=="279"||city=="280")cityN="استان آذربايجان غربي - شهر خوي";if(city=="288")cityN="استان آذربايجان غربي - شهر سردشت";if(city=="284"||city=="285")cityN="استان آذربايجان غربي - شهر سلماس";if(city=="638")cityN="استان آذربايجان غربي - شهر سيلوانه";if(city=="291")cityN="استان آذربايجان غربي - شهر سيه چشمه(چالدران)";if(city=="640")cityN="استان آذربايجان غربي - شهر شوط";if(city=="293")cityN="استان آذربايجان غربي - شهر شاهين دژ";if(city=="675")cityN="استان آذربايجان غربي - شهر کشاورز";if(city=="282"||city=="283")cityN="استان آذربايجان غربي - شهر ماکو";if(city=="286"||city=="287")cityN="استان آذربايجان غربي - شهر مهاباد";if(city=="296"||city=="297")cityN="استان آذربايجان غربي - شهر مياندوآب";if(city=="290")cityN="استان آذربايجان غربي - شهر نقده";if(city=="400"||city=="401")cityN="استان همدان - شهر اسدآباد";if(city=="404"||city=="405")cityN="استان همدان - شهر بهار";if(city=="397")cityN="استان همدان - شهر تويسرکان";if(city=="398"||city=="399")cityN="استان همدان - شهر رزن";if(city=="647")cityN="استان همدان - شهر شراء و پيشخوار";if(city=="502")cityN="استان همدان - شهر فامنين";if(city=="584")cityN="استان همدان - شهر قلقل رود";if(city=="402"||city=="403")cityN="استان همدان - شهر کبودرآهنگ";if(city=="392"||city=="393")cityN="استان همدان - شهر ملاير";if(city=="395"||city=="396")cityN="استان همدان - شهر نهاوند";if(city=="386"||city=="387")cityN="استان همدان - شهر همدان";if(city=="503")cityN="استان يزد - شهر ابرکوه";if(city=="444")cityN="استان يزد - شهر اردکان";if(city=="551")cityN="استان يزد - شهر اشکذر";if(city=="447")cityN="استان يزد - شهر بافق";if(city=="561")cityN="استان يزد - شهر بهاباد";if(city=="445")cityN="استان يزد - شهر تفت";if(city=="718")cityN="استان يزد - شهر دستگردان";if(city=="083")cityN="استان يزد - شهر طبس";if(city=="446")cityN="استان يزد - شهر مهريز";if(city=="448")cityN="استان يزد - شهر ميبد";if(city=="552")cityN="استان يزد - شهر نير";if(city=="543")cityN="استان يزد - شهر هرات و مروست";if(city=="442"||city=="443")cityN="استان يزد - شهر يزد";if(city=="051")cityN="استان مرکزي - شهر آشتيان";if(city=="052"||city=="053")cityN="استان مرکزي - شهر اراک";if(city=="058")cityN="استان مرکزي - شهر تفرش";if(city=="055")cityN="استان مرکزي - شهر خمين";if(city=="617")cityN="استان مرکزي - شهر خنداب";if(city=="057")cityN="استان مرکزي - شهر دليجان";if(city=="618")cityN="استان مرکزي - شهر زرند مرکزي";if(city=="059"||city=="060")cityN="استان مرکزي - شهر ساوه";if(city=="061"||city=="062")cityN="استان مرکزي - شهر سربند";if(city=="544")cityN="استان مرکزي - شهر فراهان";if(city=="056")cityN="استان مرکزي - شهر محلات";if(city=="571")cityN="استان مرکزي - شهر وفس";if(city=="593")cityN="استان مرکزي - شهر هندودر";if(city=="667")cityN="استان هرمزگان - شهر ابوموسي";if(city=="348")cityN="استان هرمزگان - شهر بستک";if(city=="586")cityN="استان هرمزگان - شهر بشاگرد";if(city=="338"||city=="339")cityN="استان هرمزگان - شهر بندرعباس";if(city=="343"||city=="344")cityN="استان هرمزگان - شهر بندرلنگه";if(city=="346")cityN="استان هرمزگان - شهر جاسک";if(city=="337")cityN="استان هرمزگان - شهر حاجي آباد";if(city=="554")cityN="استان هرمزگان - شهر خمير";if(city=="469")cityN="استان هرمزگان - شهر رودان";if(city=="537")cityN="استان هرمزگان - شهر فين";if(city=="345")cityN="استان هرمزگان - شهر قشم";if(city=="470")cityN="استان هرمزگان - شهر گاوبندي";if(city=="341"||city=="342")cityN="استان هرمزگان - شهر ميناب";if(city=="483"||city=="484")cityN="استان لرستان - شهر ازنا";if(city=="557")cityN="استان لرستان - شهر اشترينان";if(city=="418")cityN="استان لرستان - شهر الشتر";if(city=="416"||city=="417")cityN="استان لرستان - شهر اليگودرز";if(city=="412"||city=="413")cityN="استان لرستان - شهر بروجرد";if(city=="592")cityN="استان لرستان - شهر پاپي";if(city=="612")cityN="استان لرستان - شهر چغلوندي";if(city=="613")cityN="استان لرستان - شهر چگني";if(city=="406"||city=="407")cityN="استان لرستان - شهر خرم آباد";if(city=="421")cityN="استان لرستان - شهر دورود";if(city=="598")cityN="استان لرستان - شهر رومشکان";if(city=="419")cityN="استان لرستان - شهر کوهدشت";if(city=="385")cityN="استان لرستان - شهر ملاوي(پلدختر)";if(city=="420")cityN="استان لرستان - شهر نورآباد(دلفان)";if(city=="528")cityN="استان لرستان - شهر ويسيان";if(city=="213"||city=="214")cityN="استان مازندران - شهر آمل";if(city=="205"||city=="206")cityN="استان مازندران - شهر بابل";if(city=="498")cityN="استان مازندران - شهر بابل";if(city=="568")cityN="استان مازندران - شهر بندپي";if(city=="711")cityN="استان مازندران - شهر بندپي شرقي";if(city=="217"||city=="218")cityN="استان مازندران - شهر بهشهر";if(city=="221")cityN="استان مازندران - شهر تنکابن";if(city=="582")cityN="استان مازندران - شهر جويبار";if(city=="483")cityN="استان مازندران - شهر چالوس";if(city=="625")cityN="استان مازندران - شهر چمستان";if(city=="576")cityN="استان مازندران - شهر چهاردانگه";if(city=="578")cityN="استان مازندران - شهر دودانگه";if(city=="227")cityN="استان مازندران - شهر رامسر";if(city=="208"||city=="209")cityN="استان مازندران - شهر ساري";if(city=="225")cityN="استان مازندران - شهر سوادکوه";if(city=="577")cityN="استان مازندران - شهر شيرگاه";if(city=="712")cityN="استان مازندران - شهر عباس آباد";if(city=="215"||city=="216")cityN="استان مازندران - شهر قائمشهر";if(city=="626")cityN="استان مازندران - شهر کجور";if(city=="627")cityN="استان مازندران - شهر کلاردشت";if(city=="579")cityN="استان مازندران - شهر گلوگاه";if(city=="713")cityN="استان مازندران - شهر مياندورود";if(city=="499")cityN="استان مازندران - شهر نکاء";if(city=="222")cityN="استان مازندران - شهر نور";if(city=="219"||city=="220")cityN="استان مازندران - شهر نوشهر";if(city=="500"||city=="501")cityN="استان مازندران - شهر هراز و محمودآباد";if(city=="623")cityN="استان گلستان - شهر آزادشهر";if(city=="497")cityN="استان گلستان - شهر آق قلا";if(city=="223")cityN="استان گلستان - شهر بندرترکمن";if(city=="689")cityN="استان گلستان - شهر بندرگز";if(city=="487")cityN="استان گلستان - شهر راميان";if(city=="226")cityN="استان گلستان - شهر علي آباد";if(city=="224")cityN="استان گلستان - شهر کردکوي";if(city=="386")cityN="استان گلستان - شهر کلاله";if(city=="211"||city=="212")cityN="استان گلستان - شهر گرگان";if(city=="628")cityN="استان گلستان - شهر گميشان";if(city=="202"||city=="203")cityN="استان گلستان - شهر گنبد کاووس";if(city=="531")cityN="استان گلستان - شهر مراوه تپه";if(city=="288")cityN="استان گلستان - شهر مينودشت";if(city=="261")cityN="استان گيلان - شهر آستارا";if(city=="273")cityN="استان گيلان - شهر آستانه";if(city=="630")cityN="استان گيلان - شهر املش";if(city=="264")cityN="استان گيلان - شهر بندرانزلي";if(city=="518")cityN="استان گيلان - شهر خمام";if(city=="631")cityN="استان گيلان - شهر رحيم آباد";if(city=="258"||city=="259")cityN="استان گيلان - شهر رشت";if(city=="570")cityN="استان گيلان - شهر رضوانشهر";if(city=="265")cityN="استان گيلان - شهر رودبار";if(city=="268"||city=="269")cityN="استان گيلان - شهر رودسر";if(city=="653")cityN="استان گيلان - شهر سنگر";if(city=="517")cityN="استان گيلان - شهر سياهکل";if(city=="569")cityN="استان گيلان - شهر شفت";if(city=="267")cityN="استان گيلان - شهر صومعه سرا";if(city=="262"||city=="263")cityN="استان گيلان - شهر طالش";if(city=="593")cityN="استان گيلان - شهر عمارلو";if(city=="266")cityN="استان گيلان - شهر فومن";if(city=="693")cityN="استان گيلان - شهر کوچصفهان";if(city=="271"||city=="272")cityN="استان گيلان - شهر لاهيجان";if(city=="694")cityN="استان گيلان - شهر لشت نشاء";if(city=="270")cityN="استان گيلان - شهر لنگرود";if(city=="516")cityN="استان گيلان - شهر ماسال و شاندرمن";if(city=="333"||city=="334")cityN="استان کرمانشاه - شهر اسلام آباد";if(city=="691")cityN="استان کرمانشاه - شهر باينگان";if(city=="322"||city=="323")cityN="استان کرمانشاه - شهر پاوه";if(city=="595")cityN="استان کرمانشاه - شهر ثلاث باباجاني";if(city=="395")cityN="استان کرمانشاه - شهر جوانرود";if(city=="641")cityN="استان کرمانشاه - شهر حميل";if(city=="596")cityN="استان کرمانشاه - شهر روانسر";if(city=="336")cityN="استان کرمانشاه - شهر سرپل ذهاب";if(city=="335")cityN="استان کرمانشاه - شهر سنقر";if(city=="496")cityN="استان کرمانشاه - شهر صحنه";if(city=="337")cityN="استان کرمانشاه - شهر قصرشيرين";if(city=="324"||city=="325")cityN="استان کرمانشاه - شهر کرمانشاه";if(city=="394")cityN="استان کرمانشاه - شهر کرند";if(city=="330")cityN="استان کرمانشاه - شهر کنگاور";if(city=="332")cityN="استان کرمانشاه - شهر گيلانغرب";if(city=="331")cityN="استان کرمانشاه - شهر هرسين";if(city=="687")cityN="استان کهکيلويه و بويراحمد - شهر باشت";if(city=="422"||city=="423")cityN="استان کهکيلويه و بويراحمد - شهر بويراحمد(ياسوج)";if(city=="599")cityN="استان کهکيلويه و بويراحمد - شهر بهمني";if(city=="600")cityN="استان کهکيلويه و بويراحمد - شهر چاروسا";if(city=="688")cityN="استان کهکيلويه و بويراحمد - شهر دروهان";if(city=="424"||city=="425")cityN="استان کهکيلويه و بويراحمد - شهر کهکيلويه(دهدشت)";if(city=="426")cityN="استان کهکيلويه و بويراحمد - شهر گچساران(دوگنبدان)";if(city=="550")cityN="استان کهکيلويه و بويراحمد - شهر لنده";if(city=="697")cityN="استان کهکيلويه و بويراحمد - شهر مارگون";if(city=="384")cityN="استان کردستان - شهر بانه";if(city=="377"||city=="378")cityN="استان کردستان - شهر بيجار";if(city=="558")cityN="استان کردستان - شهر دهگلان";if(city=="385")cityN="استان کردستان - شهر ديواندره";if(city=="646")cityN="استان کردستان - شهر سروآباد";if(city=="375"||city=="376")cityN="استان کردستان - شهر سقز";if(city=="372"||city=="373")cityN="استان کردستان - شهر سنندج";if(city=="379"||city=="380")cityN="استان کردستان - شهر قروه";if(city=="383")cityN="استان کردستان - شهر کامياران";if(city=="674")cityN="استان کردستان - شهر کراني";if(city=="381"||city=="382")cityN="استان کردستان - شهر مريوان";if(city=="676")cityN="استان کردستان - شهر نمشير";if(city=="722")cityN="استان کرمان - شهر ارزونيه";if(city=="542")cityN="استان کرمان - شهر انار";if(city=="312"||city=="313")cityN="استان کرمان - شهر بافت";if(city=="317")cityN="استان کرمان - شهر بردسير";if(city=="310"||city=="311")cityN="استان کرمان - شهر بم";if(city=="302"||city=="303")cityN="استان کرمان - شهر جيرفت";if(city=="583")cityN="استان کرمان - شهر رابر";if(city=="321")cityN="استان کرمان - شهر راور";if(city=="382")cityN="استان کرمان - شهر راين";if(city=="304"||city=="305")cityN="استان کرمان - شهر رفسنجان";if(city=="536")cityN="استان کرمان - شهر رودبار کهنوج";if(city=="605")cityN="استان کرمان - شهر ريگان";if(city=="308"||city=="309")cityN="استان کرمان - شهر زرند";if(city=="306"||city=="307")cityN="استان کرمان - شهر سيرجان";if(city=="319")cityN="استان کرمان - شهر شهداد";if(city=="313"||city=="314")cityN="استان کرمان - شهر شهربابک";if(city=="606")cityN="استان کرمان - شهر عنبرآباد";if(city=="320")cityN="استان کرمان - شهر فهرج";if(city=="698")cityN="استان کرمان - شهر قلعه گنج";if(city=="298"||city=="299")cityN="استان کرمان - شهر کرمان";if(city=="535")cityN="استان کرمان - شهر کوهبنان";if(city=="315"||city=="316")cityN="استان کرمان - شهر کهنوج";if(city=="318")cityN="استان کرمان - شهر گلباف";if(city=="607")cityN="استان کرمان - شهر ماهان";if(city=="608")cityN="استان کرمان - شهر منوجان";if(city=="508")cityN="استان قزوين - شهر آبيک";if(city=="538")cityN="استان قزوين - شهر آوج";if(city=="728")cityN="استان قزوين - شهر البرز";if(city=="509")cityN="استان قزوين - شهر بوئين زهرا";if(city=="438"||city=="439")cityN="استان قزوين - شهر تاکستان";if(city=="580")cityN="استان قزوين - شهر رودبار الموت";if(city=="590")cityN="استان قزوين - شهر رودبار شهرستان";if(city=="559")cityN="استان قزوين - شهر ضياءآباد";if(city=="588")cityN="استان قزوين - شهر طارم سفلي";if(city=="431"||city=="432")cityN="استان قزوين - شهر قزوين";if(city=="037"||city=="038")cityN="استان قم - شهر قم";if(city=="702")cityN="استان قم - شهر کهک";if(city=="240"||city=="241")cityN="استان فارس - شهر آباده";if(city=="670")cityN="استان فارس - شهر آباده طشک";if(city=="648")cityN="استان فارس - شهر ارسنجان";if(city=="252")cityN="استان فارس - شهر استهبان";if(city=="678")cityN="استان فارس - شهر اشکنان";if(city=="253")cityN="استان فارس - شهر اقليد";if(city=="649")cityN="استان فارس - شهر اوز";if(city=="513")cityN="استان فارس - شهر بوانات";if(city=="546")cityN="استان فارس - شهر بيضا";if(city=="671")cityN="استان فارس - شهر جويم";if(city=="246"||city=="247")cityN="استان فارس - شهر جهرم";if(city=="654")cityN="استان فارس - شهر حاجي آباد(زرين دشت)";if(city=="548")cityN="استان فارس - شهر خرامه";if(city=="547")cityN="استان فارس - شهر خشت و کمارج";if(city=="655")cityN="استان فارس - شهر خفر";if(city=="248"||city=="249")cityN="استان فارس - شهر داراب";if(city=="253")cityN="استان فارس - شهر سپيدان";if(city=="514")cityN="استان فارس - شهر سروستان";if(city=="665")cityN="استان فارس - شهر سعادت آباد";if(city=="673")cityN="استان فارس - شهر شيبکوه";if(city=="228"||city=="229"||city=="230")cityN="استان فارس - شهر شيراز";if(city=="679")cityN="استان فارس - شهر فراشبند";if(city=="256"||city=="257")cityN="استان فارس - شهر فسا";if(city=="244"||city=="245")cityN="استان فارس - شهر فيروزآباد";if(city=="681")cityN="استان فارس - شهر قنقري(خرم بيد)";if(city=="723")cityN="استان فارس - شهر قيروکارزين";if(city=="236"||city=="237")cityN="استان فارس - شهر کازرون";if(city=="683")cityN="استان فارس - شهر کوار";if(city=="656")cityN="استان فارس - شهر کراش";if(city=="250"||city=="251")cityN="استان فارس - شهر لارستان";if(city=="515")cityN="استان فارس - شهر لامرد";if(city=="242"||city=="243")cityN="استان فارس - شهر مرودشت";if(city=="238"||city=="239")cityN="استان فارس - شهر ممسني";if(city=="657")cityN="استان فارس - شهر مهر";if(city=="255")cityN="استان فارس - شهر ني ريز";if(city=="684")cityN="استان سمنان - شهر ايوانکي";if(city=="700")cityN="استان سمنان - شهر بسطام";if(city=="642")cityN="استان سمنان - شهر بيارجمند";if(city=="457")cityN="استان سمنان - شهر دامغان";if(city=="456")cityN="استان سمنان - شهر سمنان";if(city=="458"||city=="459")cityN="استان سمنان - شهر شاهرود";if(city=="460")cityN="استان سمنان - شهر گرمسار";if(city=="530")cityN="استان سمنان - شهر مهديشهر";if(city=="520")cityN="استان سمنان - شهر ميامي";if(city=="358"||city=="359")cityN="استان سيستان و بلوچستان - شهر ايرانشهر";if(city=="682")cityN="استان سيستان و بلوچستان - شهر بزمان";if(city=="703")cityN="استان سيستان و بلوچستان - شهر بمپور";if(city=="364"||city=="365")cityN="استان سيستان و بلوچستان - شهر چابهار";if(city=="371")cityN="استان سيستان و بلوچستان - شهر خاش";if(city=="701")cityN="استان سيستان و بلوچستان - شهر دشتياري";if(city=="720")cityN="استان سيستان و بلوچستان - شهر راسک";if(city=="366"||city=="367")cityN="استان سيستان و بلوچستان - شهر زابل";if(city=="704")cityN="استان سيستان و بلوچستان - شهر زابلي";if(city=="361"||city=="362")cityN="استان سيستان و بلوچستان - شهر زاهدان";if(city=="369"||city=="370")cityN="استان سيستان و بلوچستان - شهر سراوان";if(city=="635")cityN="استان سيستان و بلوچستان - شهر سرباز";if(city=="668")cityN="استان سيستان و بلوچستان - شهر سيب و سوران";if(city=="533")cityN="استان سيستان و بلوچستان - شهر شهرکي و ناروئي(زهک)";if(city=="705")cityN="استان سيستان و بلوچستان - شهر شيب آب";if(city=="699")cityN="استان سيستان و بلوچستان - شهر فنوج";if(city=="669")cityN="استان سيستان و بلوچستان - شهر قصرقند";if(city=="725")cityN="استان سيستان و بلوچستان - شهر کنارک";if(city=="597")cityN="استان سيستان و بلوچستان - شهر لاشار(اسپکه)";if(city=="611")cityN="استان سيستان و بلوچستان - شهر ميرجاوه";if(city=="525")cityN="استان سيستان و بلوچستان - شهر نيک شهر";if(city=="181")cityN="استان خوزستان - شهر آبادان";if(city=="527")cityN="استان خوزستان - شهر آغاجاري";if(city=="585")cityN="استان خوزستان - شهر اروندکنار";if(city=="685")cityN="استان خوزستان - شهر اميديه";if(city=="663")cityN="استان خوزستان - شهر انديکا";if(city=="192"||city=="193")cityN="استان خوزستان - شهر انديمشک";if(city=="174"||city=="175")cityN="استان خوزستان - شهر اهواز";if(city=="183"||city=="184")cityN="استان خوزستان - شهر ايذه";if(city=="481")cityN="استان خوزستان - شهر باغ ملک";if(city=="706")cityN="استان خوزستان - شهر بندر امام خميني";if(city=="194"||city=="195")cityN="استان خوزستان - شهر بندرماهشهر";if(city=="185"||city=="186")cityN="استان خوزستان - شهر بهبهان";if(city=="182")cityN="استان خوزستان - شهر خرمشهر";if(city=="199"||city=="200")cityN="استان خوزستان - شهر دزفول";if(city=="198")cityN="استان خوزستان - شهر دشت آزادگان";if(city=="662")cityN="استان خوزستان - شهر رامشير";if(city=="190"||city=="191")cityN="استان خوزستان - شهر رامهرمز";if(city=="692")cityN="استان خوزستان - شهر سردشت";if(city=="189")cityN="استان خوزستان - شهر شادگان";if(city=="707")cityN="استان خوزستان - شهر شاوور";if(city=="526")cityN="استان خوزستان - شهر شوش";if(city=="187"||city=="188")cityN="استان خوزستان - شهر شوشتر";if(city=="729")cityN="استان خوزستان - شهر گتوند";if(city=="730")cityN="استان خوزستان - شهر لالي";if(city=="196"||city=="197")cityN="استان خوزستان - شهر مسجدسليمان";if(city=="661")cityN="استان خوزستان - شهر هنديجان";if(city=="680")cityN="استان خوزستان - شهر هويزه";if(city=="643")cityN="استان خراسان رضوي - شهر احمدآباد";if(city=="562")cityN="استان خراسان رضوي - شهر بجستان";if(city=="572")cityN="استان خراسان رضوي - شهر بردسکن";if(city=="074")cityN="استان خراسان رضوي - شهر تايباد";if(city=="644")cityN="استان خراسان رضوي - شهر تخت جلگه";if(city=="072"||city=="073")cityN="استان خراسان رضوي - شهر تربت جام";if(city=="069"||city=="070")cityN="استان خراسان رضوي - شهر تربت حيدريه";if(city=="521")cityN="استان خراسان رضوي - شهر جغتاي";if(city=="573")cityN="استان خراسان رضوي - شهر جوين";if(city=="522")cityN="استان خراسان رضوي - شهر چناران";if(city=="724")cityN="استان خراسان رضوي - شهر خليل آباد";if(city=="076")cityN="استان خراسان رضوي - شهر خواف";if(city=="077")cityN="استان خراسان رضوي - شهر درگز";if(city=="650")cityN="استان خراسان رضوي - شهر رشتخوار";if(city=="574")cityN="استان خراسان رضوي - شهر زبرخان";if(city=="078"||city=="079")cityN="استان خراسان رضوي - شهر سبزوار";if(city=="081")cityN="استان خراسان رضوي - شهر سرخس";if(city=="084")cityN="استان خراسان رضوي - شهر فريمان";if(city=="651")cityN="استان خراسان رضوي - شهر فيض آباد";if(city=="086"||city=="087")cityN="استان خراسان رضوي - شهر قوچان";if(city=="089"||city=="090")cityN="استان خراسان رضوي - شهر کاشمر";if(city=="553")cityN="استان خراسان رضوي - شهر کلات";if(city=="091")cityN="استان خراسان رضوي - شهر گناباد";if(city=="092"||city=="093"||city=="094")cityN="استان خراسان رضوي - شهر مشهد";if(city=="097")cityN="استان خراسان رضوي - شهر مشهد منطقه2";if(city=="098")cityN="استان خراسان رضوي - شهر مشهد منطقه3";if(city=="096")cityN="استان خراسان رضوي - شهر مشهد منطقه1";if(city=="105"||city=="106")cityN="استان خراسان رضوي - شهر نيشابور";if(city=="063")cityN="استان خراسان شمالي - شهر اسفراين";if(city=="067"||city=="068")cityN="استان خراسان شمالي - شهر بجنورد";if(city=="075")cityN="استان خراسان شمالي - شهر جاجرم";if(city=="591")cityN="استان خراسان شمالي - شهر رازوجرکلان";if(city=="082")cityN="استان خراسان شمالي - شهر شيروان";if(city=="635")cityN="استان خراسان شمالي - شهر فاروج";if(city=="524")cityN="استان خراسان شمالي - شهر مانه و سملقان";if(city=="468")cityN="استان چهارمحال و بختياري - شهر اردل";if(city=="465")cityN="استان چهارمحال و بختياري - شهر بروجن";if(city=="461"||city=="462")cityN="استان چهارمحال و بختياري - شهر شهرکرد";if(city=="467")cityN="استان چهارمحال و بختياري - شهر فارسان";if(city=="555")cityN="استان چهارمحال و بختياري - شهر کوهرنگ";if(city=="633")cityN="استان چهارمحال و بختياري - شهر کيار";if(city=="629")cityN="استان چهارمحال و بختياري - شهر گندمان";if(city=="466")cityN="استان چهارمحال و بختياري - شهر لردگان";if(city=="696")cityN="استان چهارمحال و بختياري - شهر ميانکوه";if(city=="721")cityN="استان خراسان جنوبي - شهر بشرويه";if(city=="064"||city=="065")cityN="استان خراسان جنوبي - شهر بيرجند";if(city=="523")cityN="استان خراسان جنوبي - شهر درميان";if(city=="652")cityN="استان خراسان جنوبي - شهر زيرکوه";if(city=="719")cityN="استان خراسان جنوبي - شهر سرايان";if(city=="716")cityN="استان خراسان جنوبي - شهر سربيشه";if(city=="085")cityN="استان خراسان جنوبي - شهر فردوس";if(city=="088")cityN="استان خراسان جنوبي - شهر قائنات";if(city=="563")cityN="استان خراسان جنوبي - شهر نهبندان";if(city=="529")cityN="استان بوشهر - شهر بندر ديلم";if(city=="353")cityN="استان بوشهر - شهر بندر گناوه";if(city=="349"||city=="350")cityN="استان بوشهر - شهر بوشهر";if(city=="355")cityN="استان بوشهر - شهر تنگستان";if(city=="609")cityN="استان بوشهر - شهر جم";if(city=="351"||city=="352")cityN="استان بوشهر - شهر دشتستان";if(city=="354")cityN="استان بوشهر - شهر دشتي";if(city=="732")cityN="استان بوشهر - شهر دلوار";if(city=="357")cityN="استان بوشهر - شهر دير";if(city=="532")cityN="استان بوشهر - شهر سعد آباد";if(city=="610")cityN="استان بوشهر - شهر شبانکاره";if(city=="356")cityN="استان بوشهر - شهر کنگان";if(city=="556")cityN="استان تهران - شهر اسلامشهر";if(city=="658")cityN="استان تهران - شهر پاکدشت";if(city=="001"||city=="002"||city=="003"||city=="004"||city=="005"||city=="006"||city=="007"||city=="008")cityN="استان تهران - شهر تهران مرکزي";if(city=="011")cityN="استان تهران - شهر تهران جنوب";if(city=="020")cityN="استان تهران - شهر تهران شرق";if(city=="025")cityN="استان تهران - شهر تهرانشمال";if(city=="015")cityN="استان تهران - شهر تهران غرب";if(city=="043")cityN="استان تهران - شهر دماوند";if(city=="666")cityN="استان تهران - شهر رباط کريم";if(city=="489")cityN="استان تهران - شهر ساوجبلاغ";if(city=="044"||city=="045")cityN="استان تهران - شهر شميران";if(city=="048"||city=="049")cityN="استان تهران - شهر شهرري";if(city=="490"||city=="491")cityN="استان تهران - شهر شهريار";if(city=="695")cityN="استان تهران - شهر طالقان";if(city=="659")cityN="استان تهران - شهر فيروزکوه";if(city=="031"||city=="032")cityN="استان تهران - شهر کرج";if(city=="664")cityN="استان تهران - شهر کهريزک";if(city=="717")cityN="استان تهران - شهر نظرآباد";if(city=="041"||city=="042")cityN="استان تهران - شهر ورامين";if(city=="471"||city=="472")cityN=" امور خارجه - امور خارجه";if(city=="454")cityN="استان ايلام - شهر آبدانان";if(city=="581")cityN="استان ايلام - شهر ارکوازي(ملکشاهي)";if(city=="449"||city=="450")cityN="استان ايلام - شهر ايلام";if(city=="616")cityN="استان ايلام - شهر ايوان";if(city=="534")cityN="استان ايلام - شهر بدره";if(city=="455")cityN="استان ايلام - شهر دره شهر";if(city=="451")cityN="استان ايلام - شهر دهلران";if(city=="726")cityN="استان ايلام - شهر زرين آباد";if(city=="634")cityN="استان ايلام - شهر شيروان لومار";if(city=="453")cityN="استان ايلام - شهر شيروان و چرداول";if(city=="727")cityN="استان ايلام - شهر موسيان";if(city=="452")cityN="استان ايلام - شهر مهران";if(city=="145"||city=="146")cityN="استان اردبيل - شهر اردبيل";if(city=="731")cityN="استان اردبيل - شهر ارشق";if(city=="690")cityN="استان اردبيل - شهر انگوت";if(city=="601")cityN="استان اردبيل - شهر بيله سوار";if(city=="504")cityN="استان اردبيل - شهر پارس آباد";if(city=="163")cityN="استان اردبيل - شهر خلخال";if(city=="714")cityN="استان اردبيل - شهر خورش رستم";if(city=="715")cityN="استان اردبيل - شهر سرعين";if(city=="566")cityN="استان اردبيل - شهر سنجبد(کوثر)";if(city=="166"||city=="167")cityN="استان اردبيل - شهر مشکين شهر";if(city=="161"||city=="162")cityN="استان اردبيل - شهر مغان";if(city=="686")cityN="استان اردبيل - شهر نمين";if(city=="603")cityN="استان اردبيل - شهر نير";if(city=="619")cityN="استان اصفهان - شهر آران و بيدگل";if(city=="118")cityN="استان اصفهان - شهر اردستان";if(city=="127"||city=="128"||city=="129")cityN="استان اصفهان - شهر اصفهان";if(city=="620")cityN="استان اصفهان - شهر باغ بهادران";if(city=="621")cityN="استان اصفهان - شهر بوئين و مياندشت";if(city=="549")cityN="استان اصفهان - شهر تيران و کرون";if(city=="564")cityN="استان اصفهان - شهر جرقويه";if(city=="575")cityN="استان اصفهان - شهر چادگان";if(city=="113"||city=="114")cityN="استان اصفهان - شهر خميني شهر";if(city=="122")cityN="استان اصفهان - شهر خوانسار";if(city=="540")cityN="استان اصفهان - شهر خور و بيابانک";if(city=="660")cityN="استان اصفهان - شهر دولت آباد";if(city=="120")cityN="استان اصفهان - شهر سميرم";if(city=="512")cityN="استان اصفهان - شهر سميرم سفلي (دهاقان)";if(city=="510"||city=="511")cityN="استان اصفهان - شهر شاهين شهر";if(city=="119")cityN="استان اصفهان - شهر شهرضا";if(city=="115")cityN="استان اصفهان - شهر فريدن";if(city=="112")cityN="استان اصفهان - شهر فريدونشهر";if(city=="110"||city=="111")cityN="استان اصفهان - شهر فلاورجان";if(city=="125"||city=="126")cityN="استان اصفهان - شهر کاشان";if(city=="565")cityN="استان اصفهان - شهر کوهپايه";if(city=="121")cityN="استان اصفهان - شهر گلپايگان";if(city=="116"||city=="117")cityN="استان اصفهان - شهر لنجان(زرينشهر)";if(city=="541")cityN="استان اصفهان - شهر مبارکه";if(city=="622")cityN="استان اصفهان - شهر ميمه";if(city=="124")cityN="استان اصفهان - شهر نائين";if(city=="108"||city=="109")cityN="استان اصفهان - شهر نجف آباد";if(city=="123")cityN="استان اصفهان - شهر نطنز";if(city=="427"||city=="428")cityN="استان زنجان - شهر زنجان";if(city=="507")cityN="استان آذربايجان شرقي - شهر ملکان";if(city=="158")cityN="استان آذربايجان شرقي - شهر مرند";if(city=="152"||city=="153")cityN="استان آذربايجان شرقي - شهر ميانه";if(city=="615")cityN="استان قزوين - شهر ابهر و خرمدره"
|
1227 |
-
document.getElementById("city_<?php echo $field["id"]; ?>").innerHTML = cityN;
|
1228 |
-
<?php
|
1229 |
-
}
|
1230 |
-
if(rgget("field_mellicart_sp", $field)) {
|
1231 |
-
?>
|
1232 |
-
meli_code.value = meli_code.value.substring(0,3)+"-"+meli_code.value.substring(3,9)+"-"+meli_code.value.substring(9,10);
|
1233 |
-
<?php
|
1234 |
-
}
|
1235 |
-
?>
|
1236 |
-
return true;
|
1237 |
-
}
|
1238 |
-
<?php
|
1239 |
-
if(rgget("field_mellicart", $field))
|
1240 |
-
{
|
1241 |
-
?>
|
1242 |
-
else
|
1243 |
-
{
|
1244 |
-
<?php
|
1245 |
-
if ($pm3)
|
1246 |
-
{
|
1247 |
-
?>
|
1248 |
-
var pm3 = "<?php echo $pm3 ?>";
|
1249 |
-
<?php
|
1250 |
-
}
|
1251 |
-
else
|
1252 |
-
{
|
1253 |
-
?>
|
1254 |
-
var pm3 = 'کد ملی وارد شده مطابق با استانداردهای کشور نمی باشد .';
|
1255 |
-
<?php
|
1256 |
-
}
|
1257 |
-
?>
|
1258 |
-
document.getElementById("city_<?php echo $field["id"]; ?>").innerHTML = pm3;
|
1259 |
-
return false;
|
1260 |
-
}
|
1261 |
-
<?php
|
1262 |
-
}
|
1263 |
-
?>
|
1264 |
-
}
|
1265 |
-
</script>
|
1266 |
-
<?php
|
1267 |
-
}
|
1268 |
-
return $content;
|
1269 |
-
}
|
1270 |
-
public static function checkdate($month, $day, $year){
|
1271 |
-
if(empty($month) || !is_numeric($month) || empty($day) || !is_numeric($day) || empty($year) || !is_numeric($year) || strlen($year) != 4)
|
1272 |
-
return false;
|
1273 |
-
return checkdate($month, $day, $year);
|
1274 |
-
}
|
1275 |
-
public function Input_Valid_Checker_By_HANNANStd($result, $value, $form, $field){
|
1276 |
-
//shamsi date formtat validator
|
1277 |
-
if ( $field["type"] == "date" )
|
1278 |
-
{
|
1279 |
-
if (rgget("check_jalali", $field))
|
1280 |
-
{
|
1281 |
-
if(is_array($value) && rgempty(0, $value) && rgempty(1, $value)&& rgempty(2, $value))
|
1282 |
-
$value = null;
|
1283 |
-
if(!empty($value))
|
1284 |
-
{
|
1285 |
-
$format = empty($field["dateFormat"]) ? "mdy" : $field["dateFormat"];
|
1286 |
-
$date = GFCommon::parse_date($value, $format);
|
1287 |
-
if (!empty($date) )
|
1288 |
-
{
|
1289 |
-
if ( intval($date["month"]) >= 1 && intval($date["month"]) <=12 )
|
1290 |
-
{
|
1291 |
-
$min = 1;
|
1292 |
-
if ( intval($date["month"]) >= 1 && intval($date["month"]) <=6 )
|
1293 |
-
$max = 31;
|
1294 |
-
if ( intval($date["month"]) >= 7 && intval($date["month"]) <=12 )
|
1295 |
-
$max = 30;
|
1296 |
-
if ( intval($date["month"]) == 12 && intval($date["day"]) >= 1 && intval($date["day"]) <= 30 ) {
|
1297 |
-
$j_g = GF_jalali_to_gregorian($date["year"],$date["month"],$date["day"]);
|
1298 |
-
$day = $j_g[2];
|
1299 |
-
$month = $j_g[1];
|
1300 |
-
$year = $j_g[0];
|
1301 |
-
$target = new DateTime("$year-$month-$day 09:00:00");
|
1302 |
-
$target = $target->format('Y-m-d H:i:s');
|
1303 |
-
$target = strtotime ($target);
|
1304 |
-
$leap_year = GF_jdate('L',$target,'','','en');
|
1305 |
-
if ( $leap_year != 1 )
|
1306 |
-
$max = 29;
|
1307 |
-
}
|
1308 |
-
if ( intval($date["day"]) >= $min && intval($date["day"]) <= $max ) {
|
1309 |
-
$j_g = GF_jalali_to_gregorian($date["year"],$date["month"],$date["day"]);
|
1310 |
-
$day = $j_g[2];
|
1311 |
-
$month = $j_g[1];
|
1312 |
-
$year = $j_g[0];
|
1313 |
-
$result["is_valid"] = self::checkdate($month, $day, $year);
|
1314 |
-
}
|
1315 |
-
else
|
1316 |
-
$result["is_valid"] = false;
|
1317 |
-
}
|
1318 |
-
else
|
1319 |
-
$result["is_valid"] = false;
|
1320 |
-
}
|
1321 |
-
else
|
1322 |
-
$result["is_valid"] = false;
|
1323 |
-
if(empty($date) || !$result["is_valid"] )
|
1324 |
-
{
|
1325 |
-
$format_name = "";
|
1326 |
-
switch($format)
|
1327 |
-
{
|
1328 |
-
case "mdy" :
|
1329 |
-
$format_name = "mm/dd/yyyy";
|
1330 |
-
break;
|
1331 |
-
case "dmy" :
|
1332 |
-
$format_name = "dd/mm/yyyy";
|
1333 |
-
break;
|
1334 |
-
case "dmy_dash" :
|
1335 |
-
$format_name = "dd-mm-yyyy";
|
1336 |
-
break;
|
1337 |
-
case "dmy_dot" :
|
1338 |
-
$format_name = "dd.mm.yyyy";
|
1339 |
-
break;
|
1340 |
-
case "ymd_slash" :
|
1341 |
-
$format_name = "yyyy/mm/dd";
|
1342 |
-
break;
|
1343 |
-
case "ymd_dash" :
|
1344 |
-
$format_name = "yyyy-mm-dd";
|
1345 |
-
break;
|
1346 |
-
case "ymd_dot" :
|
1347 |
-
$format_name = "yyyy.mm.dd";
|
1348 |
-
break;
|
1349 |
-
}
|
1350 |
-
$result["is_valid"] = false;
|
1351 |
-
$message = $field["dateType"] == "datepicker" ? sprintf(__("Please enter a valid date in the format (%s).", "gravityforms"), $format_name) : __("Please enter a valid date.", "gravityforms");
|
1352 |
-
$result["message"] = empty($field["errorMessage"]) ? $message : $field["errorMessage"];
|
1353 |
-
}
|
1354 |
-
else
|
1355 |
-
$result["is_valid"] = true;
|
1356 |
-
}
|
1357 |
-
}
|
1358 |
-
}
|
1359 |
-
//melli cart validator
|
1360 |
-
if ( $field["type"] == "mellicart" )
|
1361 |
-
{
|
1362 |
-
$pm1= rgget("field_mellicart_sp1", $field);
|
1363 |
-
$pm2= rgget("field_mellicart_sp2", $field);
|
1364 |
-
$pm3= rgget("field_mellicart_sp3", $field);
|
1365 |
-
$pm4= rgget("field_mellicart_sp4", $field);
|
1366 |
-
if(rgget("field_mellicart_sp", $field))
|
1367 |
-
$setting = 1;
|
1368 |
-
else
|
1369 |
-
$setting = 0;
|
1370 |
-
if (self::Add_Melli_Cart_PHP_Checker_By_HANNANStd($value,$setting) == 4)
|
1371 |
-
{
|
1372 |
-
$result["is_valid"] = false;
|
1373 |
-
if ($pm1)
|
1374 |
-
$result["message"] = $pm1;
|
1375 |
-
else
|
1376 |
-
$result["message"] = "کد ملی فقط باید به صورت عدد وارد شود . ";
|
1377 |
-
return $result;
|
1378 |
-
}
|
1379 |
-
if (self::Add_Melli_Cart_PHP_Checker_By_HANNANStd($value,$setting) == 3)
|
1380 |
-
{
|
1381 |
-
$result["is_valid"] = false;
|
1382 |
-
if ($pm2)
|
1383 |
-
$result["message"] = $pm2;
|
1384 |
-
else
|
1385 |
-
$result["message"] = 'کد ملی می بایست 10 رقمی باشد . تنها در صورتی مجاز به استفاده از کد های 8 یا 9 رقمی هستید که ارقام سمت چپ 0 باشند . ';
|
1386 |
-
return $result;
|
1387 |
-
}
|
1388 |
-
if (self::Add_Melli_Cart_PHP_Checker_By_HANNANStd($value,$setting) == 2)
|
1389 |
-
{
|
1390 |
-
$result["is_valid"] = false;
|
1391 |
-
if ($pm4)
|
1392 |
-
$result["message"] = $pm4;
|
1393 |
-
else
|
1394 |
-
$result["message"] = 'کد ملی وارد شده مطابق با استانداردهای کشور نمی باشد .';
|
1395 |
-
return $result;
|
1396 |
-
}
|
1397 |
-
if ($field["noDuplicates"] && ( RGFormsModel::is_duplicate($form["id"], $field, $value) || RGFormsModel::is_duplicate($form["id"], $field, '0'.$value) || RGFormsModel::is_duplicate($form["id"], $field, '00'.$value ) ))
|
1398 |
-
{
|
1399 |
-
$result["is_valid"] = false;
|
1400 |
-
if ($pm3)
|
1401 |
-
$result["message"] = $pm3;
|
1402 |
-
else
|
1403 |
-
$result["message"] = 'این کد ملی توسط فرد دیگری ثبت شده است .';
|
1404 |
-
return $result;
|
1405 |
-
}
|
1406 |
-
}
|
1407 |
-
|
1408 |
-
return $result;
|
1409 |
-
}
|
1410 |
-
|
1411 |
-
}
|
1412 |
-
global $Persian_Gravityforms_By_HANNANStd_plugin, $GF_Fa;
|
1413 |
-
$GF_Fa = $Persian_Gravityforms_By_HANNANStd_plugin = new GravityFormsPersian( __FILE__ );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/admin.css
DELETED
@@ -1,85 +0,0 @@
|
|
1 |
-
@font-face {
|
2 |
-
font-family: 'BYekan';
|
3 |
-
src: url('../fonts/BYekan.eot');
|
4 |
-
src: url('../fonts/BYekan.woff') format('woff'), url('../fonts/BYekan.ttf') format('truetype');
|
5 |
-
font-weight: normal;
|
6 |
-
font-style: normal;
|
7 |
-
}
|
8 |
-
*,body,html {
|
9 |
-
font-family:tahoma;
|
10 |
-
}
|
11 |
-
input,li,ul,select,textarea,#gf_merge_tag_list a{
|
12 |
-
font-family:tahoma !important;
|
13 |
-
}
|
14 |
-
#toplevel_page_gf_edit_forms a,#toplevel_page_gf_edit_forms .wp-menu-name,.newform_notice,.gatewayset p,.gatewayset td,h1,h2,h3,h4,h5,h6,h2 span,h3 span,label,#no-fields span,.group-header,#gf_form_toolbar a,.gform_tabs a,td a,td a strong,td strong a,th,.add-new-h2,.button,.stat b,.gresults-chart-wrapper *,div.gresults-results-filter-section-label,div.gresults-results-field-label,#gresults-results td,#gresults-results th,#gresults-results tr,h2 a{
|
15 |
-
font-family:BYekan !important;
|
16 |
-
font-weight:normal !important;
|
17 |
-
}
|
18 |
-
.field_hover div.gf-pagebreak-container div.gf-pagebreak-text-main span, .field_selected div.gf-pagebreak-container div.gf-pagebreak-text-main span ,.gf-pagebreak-text-after, .gf-pagebreak-text-before,div.gf-pagebreak-text-main span{
|
19 |
-
font-family:BYekan !important;
|
20 |
-
}
|
21 |
-
.field_type li input,.add-buttons-title{
|
22 |
-
font-size:12px !important;
|
23 |
-
font-family:BYekan !important;
|
24 |
-
}
|
25 |
-
h4,h5,h6 {
|
26 |
-
font-size:16px !important;
|
27 |
-
}
|
28 |
-
.group-header {
|
29 |
-
font-size:16px !important;
|
30 |
-
font-weight:normal !important;
|
31 |
-
}
|
32 |
-
.row-title,#toplevel_page_gf_edit_forms .wp-menu-name,.newform_notice{
|
33 |
-
font-size:16px !important;
|
34 |
-
}
|
35 |
-
a.gf_toolbar_active ,.gform_tabs a,label{
|
36 |
-
font-size:13px !important;
|
37 |
-
}
|
38 |
-
div.gf_entry_detail_pagination {
|
39 |
-
top:-10px !important;
|
40 |
-
}
|
41 |
-
#TB_ajaxContent,#TB_title {
|
42 |
-
text-align:right !important;
|
43 |
-
}
|
44 |
-
#gresults-results{
|
45 |
-
margin-right:0px !important;
|
46 |
-
margin-left:300px !important;
|
47 |
-
}
|
48 |
-
div#gf_nofield_1_instructions, div#gf_nofield_2_instructions, div#gf_nofield_3_instructions, div#gf_nofield_4_instructions, div#gf_nofield_5_instructions {
|
49 |
-
background-image: url("../images/Gravity_Forms_fa.png") !important;
|
50 |
-
}
|
51 |
-
.gf_nofield_3_instructions_copy_bottom {
|
52 |
-
margin-left:-163px !important;
|
53 |
-
}
|
54 |
-
.gf_nofield_4_instructions_copy_bottom {
|
55 |
-
margin-top:13px !important;
|
56 |
-
margin-left:-220px !important;
|
57 |
-
}
|
58 |
-
#gf_user_form .left_header ,.metaname , .metavalue{
|
59 |
-
float:right !important;
|
60 |
-
}
|
61 |
-
.gf_dashboard_form_title_header{
|
62 |
-
text-align:right !important;
|
63 |
-
}
|
64 |
-
.gf_dashboard_view td i{
|
65 |
-
font-style:normal !important;
|
66 |
-
font-family:byekan !important;
|
67 |
-
}
|
68 |
-
.gfur-form-select {
|
69 |
-
margin-right:415px !important;
|
70 |
-
}
|
71 |
-
optgroup {
|
72 |
-
font-style:normal !important;
|
73 |
-
}
|
74 |
-
.choice_with_value_and_price label {
|
75 |
-
margin: 0 60px 0 0 !important;
|
76 |
-
padding-left: 26px !important;
|
77 |
-
}
|
78 |
-
.choice_with_price .gfield_choice_header_label ,.choice_with_value .gfield_choice_header_label {
|
79 |
-
margin: 0 69px 0 99px !important;
|
80 |
-
}
|
81 |
-
.ui-tabs .ui-tabs-nav li {
|
82 |
-
margin-left: 0.2em !important;
|
83 |
-
margin-right: 0 !important;
|
84 |
-
float: right !important;
|
85 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/admin.rtl.css
ADDED
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#gf_merge_tag_list a{
|
2 |
+
font-family:tahoma !important;
|
3 |
+
}
|
4 |
+
#toplevel_page_gf_edit_forms a,#toplevel_page_gf_edit_forms .wp-menu-name,.newform_notice,.gatewayset p,.gatewayset td,h1,h2,h3,h4,h5,h6,h2 span,h3 span,label,#no-fields span,.group-header,#gf_form_toolbar a,.gform_tabs a,td a,td a strong,td strong a,th,.add-new-h2,.button,.stat b,.gresults-chart-wrapper *,div.gresults-results-filter-section-label,div.gresults-results-field-label,#gresults-results td,#gresults-results th,#gresults-results tr,h2 a{
|
5 |
+
font-weight:normal !important;
|
6 |
+
}
|
7 |
+
h4,h5,h6 {
|
8 |
+
font-size:16px !important;
|
9 |
+
}
|
10 |
+
.group-header {
|
11 |
+
font-size:16px !important;
|
12 |
+
font-weight:normal !important;
|
13 |
+
}
|
14 |
+
.row-title,#toplevel_page_gf_edit_forms .wp-menu-name,.newform_notice{
|
15 |
+
font-size:16px !important;
|
16 |
+
}
|
17 |
+
a.gf_toolbar_active ,.gform_tabs a,label{
|
18 |
+
font-size:13px !important;
|
19 |
+
}
|
20 |
+
div.gf_entry_detail_pagination {
|
21 |
+
top:-10px !important;
|
22 |
+
}
|
23 |
+
#TB_ajaxContent,#TB_title {
|
24 |
+
text-align:right !important;
|
25 |
+
}
|
26 |
+
#gresults-results{
|
27 |
+
margin-right:0px !important;
|
28 |
+
margin-left:300px !important;
|
29 |
+
}
|
30 |
+
div#gf_nofield_1_instructions, div#gf_nofield_2_instructions, div#gf_nofield_3_instructions, div#gf_nofield_4_instructions, div#gf_nofield_5_instructions {
|
31 |
+
background-image: url("../images/Gravity_Forms_fa.png") !important;
|
32 |
+
}
|
33 |
+
.gf_nofield_3_instructions_copy_bottom {
|
34 |
+
margin-left:-163px !important;
|
35 |
+
}
|
36 |
+
.gf_nofield_4_instructions_copy_bottom {
|
37 |
+
margin-top:13px !important;
|
38 |
+
margin-left:-220px !important;
|
39 |
+
}
|
40 |
+
#gf_user_form .left_header ,.metaname , .metavalue{
|
41 |
+
float:right !important;
|
42 |
+
}
|
43 |
+
.gf_dashboard_form_title_header{
|
44 |
+
text-align:right !important;
|
45 |
+
}
|
46 |
+
.gf_dashboard_view td i{
|
47 |
+
font-style:normal !important;
|
48 |
+
}
|
49 |
+
.gfur-form-select {
|
50 |
+
margin-right:415px !important;
|
51 |
+
}
|
52 |
+
optgroup {
|
53 |
+
font-style:normal !important;
|
54 |
+
}
|
55 |
+
.choice_with_value_and_price label {
|
56 |
+
margin: 0 60px 0 0 !important;
|
57 |
+
padding-left: 26px !important;
|
58 |
+
}
|
59 |
+
.choice_with_price .gfield_choice_header_label ,.choice_with_value .gfield_choice_header_label {
|
60 |
+
margin: 0 69px 0 99px !important;
|
61 |
+
}
|
62 |
+
.ui-tabs .ui-tabs-nav li {
|
63 |
+
margin-left: 0.2em !important;
|
64 |
+
margin-right: 0 !important;
|
65 |
+
float: right !important;
|
66 |
+
}
|
67 |
+
div#gf_nofield_1_instructions span, div#gf_nofield_2_instructions span, div#gf_nofield_3_instructions span, div#gf_nofield_4_instructions span, div#gf_nofield_5_instructions span {
|
68 |
+
line-height: 2.5rem !important;
|
69 |
+
}
|
assets/css/font.droidsans.css
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#toplevel_page_gf_edit_forms a,#toplevel_page_gf_edit_forms .wp-menu-name,.newform_notice,.gatewayset p,.gatewayset td,h1,h2,h3,h4,h5,h6,h2 span,h3 span,label,#no-fields span,.group-header,#gf_form_toolbar a,.gform_tabs a,td a,td a strong,td strong a,th,.add-new-h2,.button,.stat b,.gresults-chart-wrapper *,div.gresults-results-filter-section-label,div.gresults-results-field-label,#gresults-results td,#gresults-results th,#gresults-results tr,h2 a{
|
2 |
+
font-family:DroidNaskh !important;
|
3 |
+
font-weight:normal !important;
|
4 |
+
}
|
5 |
+
.field_hover div.gf-pagebreak-container div.gf-pagebreak-text-main span, .field_selected div.gf-pagebreak-container div.gf-pagebreak-text-main span ,.gf-pagebreak-text-after, .gf-pagebreak-text-before,div.gf-pagebreak-text-main span{
|
6 |
+
font-family:DroidNaskh !important;
|
7 |
+
}
|
8 |
+
.field_type li input,.add-buttons-title{
|
9 |
+
font-family:DroidNaskh !important;
|
10 |
+
}
|
11 |
+
.field_type li input,.add-buttons-title{
|
12 |
+
font-family:DroidNaskh !important;
|
13 |
+
}
|
14 |
+
.gf_dashboard_view td i{
|
15 |
+
font-family:DroidNaskh !important;
|
16 |
+
}
|
assets/css/font.yekan.css
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@font-face {
|
2 |
+
font-family: 'BYekan';
|
3 |
+
src: url('../fonts/BYekan.eot');
|
4 |
+
src: url('../fonts/BYekan.woff') format('woff'), url('../fonts/BYekan.ttf') format('truetype');
|
5 |
+
font-weight: normal;
|
6 |
+
font-style: normal;
|
7 |
+
}
|
8 |
+
*,body,html {
|
9 |
+
font-family:tahoma;
|
10 |
+
}
|
11 |
+
input,li,ul,select,textarea,#gf_merge_tag_list a{
|
12 |
+
font-family:tahoma !important;
|
13 |
+
}
|
14 |
+
#toplevel_page_gf_edit_forms a,#toplevel_page_gf_edit_forms .wp-menu-name,.newform_notice,.gatewayset p,.gatewayset td,h1,h2,h3,h4,h5,h6,h2 span,h3 span,label,#no-fields span,.group-header,#gf_form_toolbar a,.gform_tabs a,td a,td a strong,td strong a,th,.add-new-h2,.button,.stat b,.gresults-chart-wrapper *,div.gresults-results-filter-section-label,div.gresults-results-field-label,#gresults-results td,#gresults-results th,#gresults-results tr,h2 a{
|
15 |
+
font-family:BYekan !important;
|
16 |
+
font-weight:normal !important;
|
17 |
+
}
|
18 |
+
.field_hover div.gf-pagebreak-container div.gf-pagebreak-text-main span, .field_selected div.gf-pagebreak-container div.gf-pagebreak-text-main span ,.gf-pagebreak-text-after, .gf-pagebreak-text-before,div.gf-pagebreak-text-main span{
|
19 |
+
font-family:BYekan !important;
|
20 |
+
}
|
21 |
+
.field_type li input,.add-buttons-title{
|
22 |
+
font-family:BYekan !important;
|
23 |
+
}
|
24 |
+
.field_type li input,.add-buttons-title{
|
25 |
+
font-family:BYekan !important;
|
26 |
+
}
|
27 |
+
.gf_dashboard_view td i{
|
28 |
+
font-family:BYekan !important;
|
29 |
+
}
|
assets/css/persian-gravity-form.css
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
#keybMaster{background-color:#ddd;border-radius:6px 5px 12px 16px;box-shadow:0 2px 10px #444;cursor:default;height:auto;line-height:normal;margin:0;opacity:.95;padding:0;position:absolute;text-align:left;width:auto;z-index:1000000}#keybMaster thead tr th{border-radius:.6em .6em 0 0;font-family:tahoma;font-size:11px;font-style:normal;font-weight:400;padding:.3em 1.3em .1em;text-align:right;white-space:nowrap}#keybMaster thead tr th div{float:left;position:relative;z-index:1;cursor:pointer}#keybMaster thead tr th div ol{position:absolute;left:0;top:11px;list-style-type:none;padding:5px;overflow-y:auto;overflow-x:hidden;background-color:#f6f6f6;border:1px solid #999;display:none;text-align:right}#keybMaster thead tr th div ol li{padding:.2em .4em;cursor:pointer}#keybMaster thead tr th span{display:inline-block;padding:0 .4em;height:1.4em;line-height:1.4em;border-top:1px solid #e5e5e5;border-right:1px solid #5d5d5d;border-bottom:1px solid #5d5d5d;border-left:1px solid #e5e5e5;background-color:#ccc;cursor:pointer;margin:0 0 0 .3em;-webkit-border-radius:.3em;-moz-border-radius:.3em;border-radius:.3em;vertical-align:middle;-webkit-transition:background-color .15s ease-in-out;-o-transition:background-color .15s ease-in-out;transition:background-color .15s ease-in-out}#keybMaster thead tr th strong{font-weight:700;margin:0 -4px 0 6px}#keybMaster thead tr th small{-webkit-border-radius:.3em 0 0 .3em;-moz-border-radius:.3em 0 0 .3em;border-radius:.3em 0 0 .3em;border-right:1px solid #aaa;padding:0 .2em 0 .3em}#keybMaster thead tr th big{-webkit-border-radius:0 .3em .3em 0;-moz-border-radius:0 .3em .3em 0;border-radius:0 .3em .3em 0;border-left:0 none;margin:0;padding:0 .3em 0 .2em}#keybMaster thead tr th span:hover,#keybMaster thead tr th span.hover,#keybMaster thead tr th strong:hover,#keybMaster thead tr th strong.hover,#keybMaster thead tr th small:hover,#keybMaster thead tr th small.hover,#keybMaster thead tr th big:hover,#keybMaster thead tr th big.hover{background-color:#ddd}#keybMaster tbody tr td{text-align:left;padding:.2em .3em .3em;vertical-align:top}#keybMaster tbody tr td div{text-align:center;position:relative;zoom:1}#keybMaster tbody tr td table{white-space:nowrap;width:100%;border-collapse:separate;border-spacing:0}#keybMaster tbody tr td#keybNumpad table{margin-left:.2em;width:auto}#keybMaster tbody tr td table.keybCenter{width:auto;margin:0 auto}#keybMaster tbody tr td table tbody tr td{background-color:#333335;border-color:#e5e5e5 #5d5d5d #5d5d5d #e5e5e5;border-radius:.2em;border-style:solid;border-width:1px;color:#fff;cursor:default;font-family:tahoma;font-size:15px;height:1.8em;min-width:.75em;padding:0 .45em;transition:background-color .15s ease-in-out 0;vertical-align:middle;white-space:pre;-webkit-border-radius:.2em;-moz-border-radius:.2em;border-radius:.2em;-webkit-transition:background-color .15s ease-in-out;-o-transition:background-color .15s ease-in-out;transition:background-color .15s ease-in-out}#keybMaster tbody tr td table tbody tr td.last{width:99%}#keybMaster tbody tr td table tbody tr td.space{padding:0 4em}#keybMaster tbody tr td table tbody tr td.deadkey{background-color:#ccd}#keybMaster tbody tr td table tbody tr td.target{background-color:#ddc}#keybMaster tbody tr td table tbody tr td:hover,#keybMaster tbody tr td table tbody tr td.hover{border-top:1px solid #d5d5d5;border-right:1px solid #555;border-bottom:1px solid #555;border-left:1px solid #d5d5d5;background-color:#ccc}#keybMaster thead tr th span:active,#keybMaster thead tr th span.pressed,#keybMaster tbody tr td table tbody tr td:active,#keybMaster tbody tr td table tbody tr td.pressed{border-top:1px solid #555;border-right:1px solid #d5d5d5;border-bottom:1px solid #d5d5d5;border-left:1px solid #555;background-color:#ccc}#keybMaster tbody tr td table tbody tr td small{display:block;text-align:center;font-size:.6em;line-height:1.1em}#keybMaster tbody tr td div label{position:absolute;bottom:.2em;left:.3em}#keybMaster tbody tr td div label input{background-color:#f6f6f6;vertical-align:middle;font-size:inherit;width:1.1em;height:1.1em}#keybMaster tbody tr td div var{position:absolute;bottom:0;right:3px;font-weight:700;font-style:italic;color:#444}.keybInitiator{margin:0 3px;vertical-align:middle;cursor:pointer}.gright,.gform_wrapper form,.gform_wrapper ul li:before,.gform_wrapper ul li:after,.gform_wrapper ul.gform_fields{text-align:right!important;direction:rtl!important}.gleft,.gform_wrapper input[type="url"],.gform_wrapper input[type="email"],.gform_wrapper input[type="tel"],.gform_wrapper input[type="number"],.gform_wrapper input[type="password"],body.rtl .gform_wrapper input[type="email"],body.rtl .gform_wrapper input[type="password"],body.rtl .gform_wrapper input[type="url"],body.rtl .gform_wrapper input[type="tel"],body .gform_wrapper.gf_rtl_wrapper input[type="email"],body .gform_wrapper.gf_rtl_wrapper input[type="password"],body .gform_wrapper.gf_rtl_wrapper input[type="url"],body .gform_wrapper.gf_rtl_wrapper input[type="tel"]{text-align:left!important;direction:ltr!important}.gform_wrapper .ginput_complex .ginput_left{float:right!important}.gform_wrapper .ginput_complex .ginput_right{float:left!important}
|
2 |
-
.gform_wrapper .ginput_complex.ginput_container.has_first_name.has_middle_name.has_last_name span.name_first,
|
3 |
-
.gform_wrapper .ginput_complex.ginput_container.has_first_name.has_middle_name.has_last_name span.name_middle,
|
4 |
-
.gform_wrapper .ginput_complex.ginput_container.has_first_name.no_middle_name.has_last_name span.name_first{
|
5 |
-
margin-right:0px !important;
|
6 |
-
margin-left: 1.3% !important;
|
7 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/{printer.css → print.rtl.css}
RENAMED
File without changes
|
assets/js/date-picker.js
DELETED
@@ -1,39 +0,0 @@
|
|
1 |
-
var hs=jQuery.noConflict();hs(document).ready(function(hs){function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={calendar:Date,closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};hs.extend(this._defaults,this.regional[""]);this.dpDiv=bindHover(hs('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.bind("mouseout",function(e){var n=hs(e.target).closest(t);if(!n.length){return}n.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(n){var r=hs(n.target).closest(t);if(hs.datepicker._isDisabledDatepicker(instActive.inline?e.parent()[0]:instActive.input[0])||!r.length){return}r.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");r.addClass("ui-state-hover");if(r.hasClass("ui-datepicker-prev")){r.addClass("ui-datepicker-prev-hover")}if(r.hasClass("ui-datepicker-next")){r.addClass("ui-datepicker-next-hover")}})}function extendRemove(e,t){hs.extend(e,t);for(var n in t){if(t[n]==null||t[n]==undefined){e[n]=t[n]}}return e}function isArray(e){return e&&(hs.browser.safari&&typeof e=="object"&&e.length||e.constructor&&e.constructor.toString().match(/\Array\(\)/))}function mod(e,t){return e-t*Math.floor(e/t)}function leap_gregorian(e){return e%4==0&&!(e%100==0&&e%400!=0)}function gregorian_to_jd(e,t,n){return GREGORIAN_EPOCH-1+365*(e-1)+Math.floor((e-1)/4)+ -Math.floor((e-1)/100)+Math.floor((e-1)/400)+Math.floor((367*t-362)/12+(t<=2?0:leap_gregorian(e)?-1:-2)+n)}function jd_to_gregorian(e){var t,n,r,i,s,o,u,a,f,l,c,h,p;t=Math.floor(e-.5)+.5;n=t-GREGORIAN_EPOCH;r=Math.floor(n/146097);i=mod(n,146097);s=Math.floor(i/36524);o=mod(i,36524);u=Math.floor(o/1461);a=mod(o,1461);f=Math.floor(a/365);c=r*400+s*100+u*4+f;if(!(s==4||f==4)){c++}h=t-gregorian_to_jd(c,1,1);p=t<gregorian_to_jd(c,3,1)?0:leap_gregorian(c)?1:2;month=Math.floor(((h+p)*12+373)/367);day=t-gregorian_to_jd(c,month,1)+1;return new Array(c,month,day)}function leap_islamic(e){return(e*11+14)%30<11}function islamic_to_jd(e,t,n){return n+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+ISLAMIC_EPOCH-1}function jd_to_islamic(e){var t,n,r;e=Math.floor(e)+.5;t=Math.floor((30*(e-ISLAMIC_EPOCH)+10646)/10631);n=Math.min(12,Math.ceil((e-(29+islamic_to_jd(t,1,1)))/29.5)+1);r=e-islamic_to_jd(t,n,1)+1;return new Array(t,n,r)}function leap_persian(e){return((e-(e>0?474:473))%2820+474+38)*682%2816<682}function persian_to_jd(e,t,n){var r,i;r=e-(e>=0?474:473);i=474+mod(r,2820);return n+(t<=7?(t-1)*31:(t-1)*30+6)+Math.floor((i*682-110)/2816)+(i-1)*365+Math.floor(r/2820)*1029983+(PERSIAN_EPOCH-1)}function jd_to_persian(e){var t,n,r,i,s,o,u,a,f,l;e=Math.floor(e)+.5;i=e-persian_to_jd(475,1,1);s=Math.floor(i/1029983);o=mod(i,1029983);if(o==1029982){u=2820}else{a=Math.floor(o/366);f=mod(o,366);u=Math.floor((2134*a+2816*f+2815)/1028522)+a+1}t=u+2820*s+474;if(t<=0){t--}l=e-persian_to_jd(t,1,1)+1;n=l<=186?Math.ceil(l/31):Math.ceil((l-6)/30);r=e-persian_to_jd(t,n,1)+1;return new Array(t,n,r)}function JalaliDate(e,t,n){function o(e){var t=0;if(e[1]<0){t=leap_persian(e[0]-1)?30:29;e[1]++}var n=jd_to_gregorian(persian_to_jd(e[0],e[1]+1,e[2])-t);n[1]--;return n}function u(e){var t=jd_to_persian(gregorian_to_jd(e[0],e[1]+1,e[2]));t[1]--;return t}function a(e){if(e&&e.getGregorianDate){e=e.getGregorianDate()}r=new Date(e);r.setHours(r.getHours()>12?r.getHours()+2:0);if(!r||r=="Invalid Date"||isNaN(r||!r.getDate())){r=new Date}i=u([r.getFullYear(),r.getMonth(),r.getDate()]);return this}var r;var i;if(!isNaN(parseInt(e))&&!isNaN(parseInt(t))&&!isNaN(parseInt(n))){var s=o([parseInt(e,10),parseInt(t,10),parseInt(n,10)]);a(new Date(s[0],s[1],s[2]))}else{a(e)}this.getGregorianDate=function(){return r};this.setFullDate=a;this.setMonth=function(e){i[1]=e;var t=o(i);r=new Date(t[0],t[1],t[2]);i=u([t[0],t[1],t[2]])};this.setDate=function(e){i[2]=e;var t=o(i);r=new Date(t[0],t[1],t[2]);i=u([t[0],t[1],t[2]])};this.getFullYear=function(){return i[0]};this.getMonth=function(){return i[1]};this.getDate=function(){return i[2]};this.toString=function(){return i.join(",").toString()};this.getDay=function(){return r.getDay()};this.getHours=function(){return r.getHours()};this.getMinutes=function(){return r.getMinutes()};this.getSeconds=function(){return r.getSeconds()};this.getTime=function(){return r.getTime()};this.getTimeZoneOffset=function(){return r.getTimeZoneOffset()};this.getYear=function(){return i[0]%100};this.setHours=function(e){r.setHours(e)};this.setMinutes=function(e){r.setMinutes(e)};this.setSeconds=function(e){r.setSeconds(e)};this.setMilliseconds=function(e){r.setMilliseconds(e)}}hs.extend(hs.ui,{datepicker:{version:"1.8.14"}});var PROP_NAME="datepicker";var dpuuid=(new Date).getTime();var instActive;hs.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){if(this.debug){console.log.apply("",arguments)}},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){extendRemove(this._defaults,e||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=nodeName=="div"||nodeName=="span";if(!target.id){this.uuid+=1;target.id="dp"+this.uuid}var inst=this._newInst(hs(target),inline);var regional=hs.extend({},settings&&this.regional[settings.regional]||{});inst.settings=hs.extend(regional,settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(e,t){var n=e[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\hs1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:!t?this.dpDiv:bindHover(hs('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(e,t){var n=hs(e);t.append=hs([]);t.trigger=hs([]);if(n.hasClass(this.markerClassName)){return}this._attachments(n,t);n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,n,r){t.settings[n]=r}).bind("getData.datepicker",function(e,n){return this._get(t,n)});this._autoSize(t);hs.data(e,PROP_NAME,t)},_attachments:function(e,t){var n=this._get(t,"appendText");var r=false;if(t.append){t.append.remove()}if(n){t.append=hs('<span class="'+this._appendClass+'">'+n+"</span>");e[r?"before":"after"](t.append)}e.unbind("focus",this._showDatepicker);if(t.trigger){t.trigger.remove()}var i=this._get(t,"showOn");if(i=="focus"||i=="both"){e.focus(this._showDatepicker)}if(i=="button"||i=="both"){var s=this._get(t,"buttonText");var o=this._get(t,"buttonImage");t.trigger=hs(this._get(t,"buttonImageOnly")?hs("<img/>").addClass(this._triggerClass).attr({src:o,alt:s,title:s}):hs('<button type="button"></button>').addClass(this._triggerClass).html(o==""?s:hs("<img/>").attr({src:o,alt:s,title:s})));e[r?"before":"after"](t.trigger);t.trigger.click(function(){if(hs.datepicker._datepickerShowing&&hs.datepicker._lastInput==e[0]){hs.datepicker._hideDatepicker()}else{hs.datepicker._showDatepicker(e[0])}return false})}},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t=new Date(2009,12-1,20);var n=this._get(e,"dateFormat");if(n.match(/[DM]/)){var r=function(e){var t=0;var n=0;for(var r=0;r<e.length;r++){if(e[r].length>t){t=e[r].length;n=r}}return n};t.setMonth(r(this._get(e,n.match(/MM/)?"monthNames":"monthNamesShort")));t.setDate(r(this._get(e,n.match(/DD/)?"dayNames":"dayNamesShort"))+20-t.getDay())}e.input.attr("size",this._formatDate(e,t).length)}},_inlineDatepicker:function(e,t){var n=hs(e);if(n.hasClass(this.markerClassName)){return}n.addClass(this.markerClassName).append(t.dpDiv).bind("setData.datepicker",function(e,n,r){t.settings[n]=r}).bind("getData.datepicker",function(e,n){return this._get(t,n)});hs.data(e,PROP_NAME,t);this._setDate(t,this._getDefaultDate(t),true);this._updateDatepicker(t);this._updateAlternate(t);t.dpDiv.show()},_dialogDatepicker:function(e,t,n,r,i){var s=this._dialogInst;if(!s){this.uuid+=1;var o="dp"+this.uuid;this._dialogInput=hs('<input type="text" id="'+o+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);hs("body").append(this._dialogInput);s=this._dialogInst=this._newInst(this._dialogInput,false);s.settings={};hs.data(this._dialogInput[0],PROP_NAME,s)}extendRemove(s.settings,r||{});t=t&&t.constructor==Date?this._formatDate(s,t):t;this._dialogInput.val(t);this._pos=i?i.length?i:[i.pageX,i.pageY]:null;if(!this._pos){var u=document.documentElement.clientWidth;var a=document.documentElement.clientHeight;var f=document.documentElement.scrollLeft||document.body.scrollLeft;var l=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[u/2-100+f,a/2-150+l]}this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");s.settings.onSelect=n;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if(hs.blockUI){hs.blockUI(this.dpDiv)}hs.data(this._dialogInput[0],PROP_NAME,s);return this},_destroyDatepicker:function(e){var t=hs(e);var n=hs.data(e,PROP_NAME);if(!t.hasClass(this.markerClassName)){return}var r=e.nodeName.toLowerCase();hs.removeData(e,PROP_NAME);if(r=="input"){n.append.remove();n.trigger.remove();t.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(r=="div"||r=="span"){t.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(e){var t=hs(e);var n=hs.data(e,PROP_NAME);if(!t.hasClass(this.markerClassName)){return}var r=e.nodeName.toLowerCase();if(r=="input"){e.disabled=false;n.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(r=="div"||r=="span"){var i=t.children("."+this._inlineClass);i.children().removeClass("ui-state-disabled");i.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}}this._disabledInputs=hs.map(this._disabledInputs,function(t){return t==e?null:t})},_disableDatepicker:function(e){var t=hs(e);var n=hs.data(e,PROP_NAME);if(!t.hasClass(this.markerClassName)){return}var r=e.nodeName.toLowerCase();if(r=="input"){e.disabled=true;n.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(r=="div"||r=="span"){var i=t.children("."+this._inlineClass);i.children().addClass("ui-state-disabled");i.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}}this._disabledInputs=hs.map(this._disabledInputs,function(t){return t==e?null:t});this._disabledInputs[this._disabledInputs.length]=e},_isDisabledDatepicker:function(e){if(!e){return false}for(var t=0;t<this._disabledInputs.length;t++){if(this._disabledInputs[t]==e){return true}}return false},_getInst:function(e){try{return hs.data(e,PROP_NAME)}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,n){var r=this._getInst(e);if(arguments.length==2&&typeof t=="string"){return t=="defaults"?hs.extend({},hs.datepicker._defaults):r?t=="all"?hs.extend({},r.settings):this._get(r,t):null}var i=t||{};if(typeof t=="string"){i={};i[t]=n}if(r){if(this._curInst==r){this._hideDatepicker()}var s=this._getDateDatepicker(e,true);var o=this._getMinMaxDate(r,"min");var u=this._getMinMaxDate(r,"max");extendRemove(r.settings,i);if(o!==null&&i.dateFormat!==undefined&&i.minDate===undefined){r.settings.minDate=this._formatDate(r,o)}if(u!==null&&i.dateFormat!==undefined&&i.maxDate===undefined){r.settings.maxDate=this._formatDate(r,u)}this._attachments(hs(e),r);this._autoSize(r);this._setDate(r,s);this._updateAlternate(r);this._updateDatepicker(r)}},_changeDatepicker:function(e,t,n){this._optionDatepicker(e,t,n)},_refreshDatepicker:function(e){var t=this._getInst(e);if(t){this._updateDatepicker(t)}},_setDateDatepicker:function(e,t){var n=this._getInst(e);if(n){this._setDate(n,t);this._updateDatepicker(n);this._updateAlternate(n)}},_getDateDatepicker:function(e,t){var n=this._getInst(e);if(n&&!n.inline){this._setDateFromField(n,t)}return n?this._getDate(n):null},_doKeyDown:function(e){var t=hs.datepicker._getInst(e.target);var n=true;var r=t.dpDiv.is(".ui-datepicker-rtl");t._keyEvent=true;if(hs.datepicker._datepickerShowing){switch(e.keyCode){case 9:hs.datepicker._hideDatepicker();n=false;break;case 13:var i=hs("td."+hs.datepicker._dayOverClass+":not(."+hs.datepicker._currentClass+")",t.dpDiv);if(i[0]){hs.datepicker._selectDay(e.target,t.selectedMonth,t.selectedYear,i[0])}else{hs.datepicker._hideDatepicker()}return false;break;case 27:hs.datepicker._hideDatepicker();break;case 33:hs.datepicker._adjustDate(e.target,e.ctrlKey?-hs.datepicker._get(t,"stepBigMonths"):-hs.datepicker._get(t,"stepMonths"),"M");break;case 34:hs.datepicker._adjustDate(e.target,e.ctrlKey?+hs.datepicker._get(t,"stepBigMonths"):+hs.datepicker._get(t,"stepMonths"),"M");break;case 35:if(e.ctrlKey||e.metaKey){hs.datepicker._clearDate(e.target)}n=e.ctrlKey||e.metaKey;break;case 36:if(e.ctrlKey||e.metaKey){hs.datepicker._gotoToday(e.target)}n=e.ctrlKey||e.metaKey;break;case 37:if(e.ctrlKey||e.metaKey){hs.datepicker._adjustDate(e.target,r?+1:-1,"D")}n=e.ctrlKey||e.metaKey;if(e.originalEvent.altKey){hs.datepicker._adjustDate(e.target,e.ctrlKey?-hs.datepicker._get(t,"stepBigMonths"):-hs.datepicker._get(t,"stepMonths"),"M")}break;case 38:if(e.ctrlKey||e.metaKey){hs.datepicker._adjustDate(e.target,-7,"D")}n=e.ctrlKey||e.metaKey;break;case 39:if(e.ctrlKey||e.metaKey){hs.datepicker._adjustDate(e.target,r?-1:+1,"D")}n=e.ctrlKey||e.metaKey;if(e.originalEvent.altKey){hs.datepicker._adjustDate(e.target,e.ctrlKey?+hs.datepicker._get(t,"stepBigMonths"):+hs.datepicker._get(t,"stepMonths"),"M")}break;case 40:if(e.ctrlKey||e.metaKey){hs.datepicker._adjustDate(e.target,+7,"D")}n=e.ctrlKey||e.metaKey;break;default:n=false}}else{if(e.keyCode==36&&e.ctrlKey){hs.datepicker._showDatepicker(this)}else{n=false}}if(n){e.preventDefault();e.stopPropagation()}},_doKeyPress:function(e){var t=hs.datepicker._getInst(e.target);if(hs.datepicker._get(t,"constrainInput")){var n=hs.datepicker._possibleChars(hs.datepicker._get(t,"dateFormat"));var r=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||e.metaKey||r<" "||!n||n.indexOf(r)>-1}},_doKeyUp:function(e){var t=hs.datepicker._getInst(e.target);if(t.input.val()!=t.lastVal){try{var n=hs.datepicker.parseDate(hs.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,hs.datepicker._getFormatConfig(t));if(n){hs.datepicker._setDateFromField(t);hs.datepicker._updateAlternate(t);hs.datepicker._updateDatepicker(t)}}catch(e){hs.datepicker.log(e)}}return true},_showDatepicker:function(e){e=e.target||e;if(e.nodeName.toLowerCase()!="input"){e=hs("input",e.parentNode)[0]}if(hs.datepicker._isDisabledDatepicker(e)||hs.datepicker._lastInput==e){return}var t=hs.datepicker._getInst(e);if(hs.datepicker._curInst&&hs.datepicker._curInst!=t){if(hs.datepicker._datepickerShowing){hs.datepicker._triggerOnClose(hs.datepicker._curInst)}hs.datepicker._curInst.dpDiv.stop(true,true)}var n=hs.datepicker._get(t,"beforeShow");extendRemove(t.settings,n?n.apply(e,[e,t]):{});t.lastVal=null;hs.datepicker._lastInput=e;hs.datepicker._setDateFromField(t);if(hs.datepicker._inDialog){e.value=""}if(!hs.datepicker._pos){hs.datepicker._pos=hs.datepicker._findPos(e);hs.datepicker._pos[1]+=e.offsetHeight}var r=false;hs(e).parents().each(function(){r|=hs(this).css("position")=="fixed";return!r});if(r&&hs.browser.opera){hs.datepicker._pos[0]-=document.documentElement.scrollLeft;hs.datepicker._pos[1]-=document.documentElement.scrollTop}var i={left:hs.datepicker._pos[0],top:hs.datepicker._pos[1]};hs.datepicker._pos=null;t.dpDiv.empty();t.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});hs.datepicker._updateDatepicker(t);i=hs.datepicker._checkOffset(t,i,r);t.dpDiv.css({position:hs.datepicker._inDialog&&hs.blockUI?"static":r?"fixed":"absolute",display:"none",left:i.left+"px",top:i.top+"px"});if(!t.inline){var s=hs.datepicker._get(t,"showAnim");var o=hs.datepicker._get(t,"duration");var u=function(){var e=t.dpDiv.find("iframe.ui-datepicker-cover");if(!!e.length){var n=hs.datepicker._getBorders(t.dpDiv);e.css({left:-n[0],top:-n[1],width:t.dpDiv.outerWidth(),height:t.dpDiv.outerHeight()})}};t.dpDiv.zIndex(hs(e).zIndex()+1);hs.datepicker._datepickerShowing=true;if(hs.effects&&hs.effects[s]){t.dpDiv.show(s,hs.datepicker._get(t,"showOptions"),o,u)}else{t.dpDiv[s||"show"](s?o:null,u)}if(!s||!o){u()}if(t.input.is(":visible")&&!t.input.is(":disabled")){t.input.focus()}hs.datepicker._curInst=t}},_updateDatepicker:function(e){var t=this;t.maxRows=4;var n=hs.datepicker._getBorders(e.dpDiv);instActive=e;e.dpDiv.empty().append(this._generateHTML(e));var r=e.dpDiv.find("iframe.ui-datepicker-cover");if(!!r.length){r.css({left:-n[0],top:-n[1],width:e.dpDiv.outerWidth(),height:e.dpDiv.outerHeight()})}e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i=this._getNumberOfMonths(e);var s=i[1];var o=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");if(s>1){e.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",o*s+"em")}e.dpDiv[(i[0]!=1||i[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(e==hs.datepicker._curInst&&hs.datepicker._datepickerShowing&&e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&e.input[0]!=document.activeElement){e.input.focus()}if(e.yearshtml){var u=e.yearshtml;setTimeout(function(){if(u===e.yearshtml&&e.yearshtml){e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml)}u=e.yearshtml=null},0)}},_getBorders:function(e){var t=function(e){return{thin:1,medium:2,thick:3}[e]||e};return[parseFloat(t(e.css("border-left-width"))),parseFloat(t(e.css("border-top-width")))]},_checkOffset:function(e,t,n){var r=e.dpDiv.outerWidth();var i=e.dpDiv.outerHeight();var s=e.input?e.input.outerWidth():0;var o=e.input?e.input.outerHeight():0;var u=document.documentElement.clientWidth+hs(document).scrollLeft();var a=document.documentElement.clientHeight+hs(document).scrollTop();t.left-=this._get(e,"isRTL")?r-s:0;t.left-=n&&t.left==e.input.offset().left?hs(document).scrollLeft():0;t.top-=n&&t.top==e.input.offset().top+o?hs(document).scrollTop():0;t.left-=Math.min(t.left,t.left+r>u&&u>r?Math.abs(t.left+r-u):0);t.top-=Math.min(t.top,t.top+i>a&&a>i?Math.abs(i+o):0);return t},_findPos:function(e){var t=this._getInst(e);var n=this._get(t,"isRTL");while(e&&(e.type=="hidden"||e.nodeType!=1||hs.expr.filters.hidden(e))){e=e[n?"previousSibling":"nextSibling"]}var r=hs(e).offset();return[r.left,r.top]},_triggerOnClose:function(e){var t=this._get(e,"onClose");if(t){t.apply(e.input?e.input[0]:null,[e.input?e.input.val():"",e])}},_hideDatepicker:function(e){var t=this._curInst;if(!t||e&&t!=hs.data(e,PROP_NAME)){return}if(this._datepickerShowing){var n=this._get(t,"showAnim");var r=this._get(t,"duration");var i=function(){hs.datepicker._tidyDialog(t);this._curInst=null};if(hs.effects&&hs.effects[n]){t.dpDiv.hide(n,hs.datepicker._get(t,"showOptions"),r,i)}else{t.dpDiv[n=="slideDown"?"slideUp":n=="fadeIn"?"fadeOut":"hide"](n?r:null,i)}if(!n){i()}hs.datepicker._triggerOnClose(t);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(hs.blockUI){hs.unblockUI();hs("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(!hs.datepicker._curInst){return}var t=hs(e.target);if(t[0].id!=hs.datepicker._mainDivId&&t.parents("#"+hs.datepicker._mainDivId).length==0&&!t.hasClass(hs.datepicker.markerClassName)&&!t.hasClass(hs.datepicker._triggerClass)&&hs.datepicker._datepickerShowing&&!(hs.datepicker._inDialog&&hs.blockUI)){hs.datepicker._hideDatepicker()}},_adjustDate:function(e,t,n){var r=hs(e);var i=this._getInst(r[0]);if(this._isDisabledDatepicker(r[0])){return}this._adjustInstDate(i,t+(n=="M"?this._get(i,"showCurrentAtPos"):0),n);this._updateDatepicker(i)},_gotoToday:function(e){var t=hs(e);var n=this._getInst(t[0]);if(this._get(n,"gotoCurrent")&&n.currentDay){n.selectedDay=n.currentDay;n.drawMonth=n.selectedMonth=n.currentMonth;n.drawYear=n.selectedYear=n.currentYear}else{var r=new this.CDate;n.selectedDay=r.getDate();n.drawMonth=n.selectedMonth=r.getMonth();n.drawYear=n.selectedYear=r.getFullYear()}this._notifyChange(n);this._adjustDate(t)},_selectMonthYear:function(e,t,n){var r=hs(e);var i=this._getInst(r[0]);i._selectingMonthYear=false;i["selected"+(n=="M"?"Month":"Year")]=i["draw"+(n=="M"?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10);this._notifyChange(i);this._adjustDate(r)},_clickMonthYear:function(e){var t=hs(e);var n=this._getInst(t[0]);if(n.input&&n._selectingMonthYear){setTimeout(function(){n.input.focus()},0)}n._selectingMonthYear=!n._selectingMonthYear},_selectDay:function(e,t,n,r){var i=hs(e);if(hs(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(i[0])){return}var s=this._getInst(i[0]);s.selectedDay=s.currentDay=hs("a",r).html();s.selectedMonth=s.currentMonth=t;s.selectedYear=s.currentYear=n;this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear))},_clearDate:function(e){var t=hs(e);var n=this._getInst(t[0]);this._selectDate(t,"")},_selectDate:function(e,t){var n=hs(e);var r=this._getInst(n[0]);t=t!=null?t:this._formatDate(altFormat,date,this._getFormatConfig(r));if(r.input){r.input.val(t)}this._updateAlternate(r);var i=this._get(r,"onSelect");if(i){i.apply(r.input?r.input[0]:null,[t,r])}else{if(r.input){r.input.trigger("change")}}if(r.inline){this._updateDatepicker(r)}else{this._hideDatepicker();this._lastInput=r.input[0];if(typeof r.input[0]!="object"){r.input.focus()}this._lastInput=null}},_updateAlternate:function(e){var t=this._get(e,"altField");if(t){var n=this._get(e,"altFormat")||this._get(e,"dateFormat");var r=this._getDate(e);var i=this.formatDate(n,r,this._getFormatConfig(e));hs(t).each(function(){hs(this).val(i)})}},noWeekends:function(e){var t=e.getDay();return[t>0&&t<6,""]},iso8601Week:function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();t.setMonth(0);t.setDate(1);return Math.floor(Math.round((n-t)/864e5)/7)+1},parseDate:function(e,t,n){if(e==null||t==null){throw"Invalid arguments"}t=typeof t=="object"?t.toString():t+"";if(t==""){return null}var r=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff;r=typeof r!="string"?r:(new this.CDate).getFullYear()%100+parseInt(r,10);var i=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort;var s=(n?n.dayNames:null)||this._defaults.dayNames;var o=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort;var u=(n?n.monthNames:null)||this._defaults.monthNames;var a=-1;var f=-1;var l=-1;var c=-1;var h=false;var p=function(t){var n=y+1<e.length&&e.charAt(y+1)==t;if(n){y++}return n};var d=function(e){var n=p(e);var r=e=="@"?14:e=="!"?20:e=="y"&&n?4:e=="o"?3:2;var i=new RegExp("^\\d{1,"+r+"}");var s=t.substring(g).match(i);if(!s){throw"Missing number at position "+g}g+=s[0].length;return parseInt(s[0],10)};var v=function(e,n,r){var i=hs.map(p(e)?r:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});var s=-1;hs.each(i,function(e,n){var r=n[1];if(t.substr(g,r.length).toLowerCase()==r.toLowerCase()){s=n[0];g+=r.length;return false}});if(s!=-1){return s+1}else{throw"Unknown name at position "+g}};var m=function(){if(t.charAt(g)!=e.charAt(y)){throw"Unexpected literal at position "+g}g++};var g=0;for(var y=0;y<e.length;y++){if(h){if(e.charAt(y)=="'"&&!p("'")){h=false}else{m()}}else{switch(e.charAt(y)){case"d":l=d("d");break;case"D":v("D",i,s);break;case"o":c=d("o");break;case"m":f=d("m");break;case"M":f=v("M",o,u);break;case"y":a=d("y");break;case"@":var b=new this.CDate(d("@"));a=b.getFullYear();f=b.getMonth()+1;l=b.getDate();break;case"!":var b=new Date((d("!")-this._ticksTo1970)/1e4);a=b.getFullYear();f=b.getMonth()+1;l=b.getDate();break;case"'":if(p("'")){m()}else{h=true}break;default:m()}}}if(g<t.length){throw"Extra/unparsed characters found in date: "+t.substring(g)}if(a==-1){a=(new this.CDate).getFullYear()}else{if(a<100){a+=(new this.CDate).getFullYear()-(new this.CDate).getFullYear()%100+(a<=r?0:-100)}}if(c>-1){f=1;l=c;do{var w=this._getDaysInMonth(a,f-1);if(l<=w){break}f++;l-=w}while(true)}var b=this._daylightSavingAdjust(new this.CDate(a,f-1,l));if(b.getFullYear()!=a||b.getMonth()+1!=f||b.getDate()!=l){throw"Invalid date"}return b},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*1e7,formatDate:function(e,t,n){if(!t){return""}var r=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort;var i=(n?n.dayNames:null)||this._defaults.dayNames;var s=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort;var o=(n?n.monthNames:null)||this._defaults.monthNames;var u=function(t){var n=h+1<e.length&&e.charAt(h+1)==t;if(n){h++}return n};var a=function(e,t,n){var r=""+t;if(u(e)){while(r.length<n){r="0"+r}}return r};var f=function(e,t,n,r){return u(e)?r[t]:n[t]};var l="";var c=false;if(t){for(var h=0;h<e.length;h++){if(c){if(e.charAt(h)=="'"&&!u("'")){c=false}else{l+=e.charAt(h)}}else{switch(e.charAt(h)){case"d":l+=a("d",t.getDate(),2);break;case"D":l+=f("D",t.getDay(),r,i);break;case"o":l+=a("o",Math.round(((new this.CDate(t.getFullYear(),t.getMonth(),t.getDate())).getTime()-(new this.CDate(t.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":l+=a("m",t.getMonth()+1,2);break;case"M":l+=f("M",t.getMonth(),s,o);break;case"y":l+=u("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":l+=t.getTime();break;case"!":l+=t.getTime()*1e4+this._ticksTo1970;break;case"'":if(u("'")){l+="'"}else{c=true}break;default:l+=e.charAt(h)}}}}return l},_possibleChars:function(e){var t="";var n=false;var r=function(t){var n=i+1<e.length&&e.charAt(i+1)==t;if(n){i++}return n};for(var i=0;i<e.length;i++){if(n){if(e.charAt(i)=="'"&&!r("'")){n=false}else{t+=e.charAt(i)}}else{switch(e.charAt(i)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":if(r("'")){t+="'"}else{n=true}break;default:t+=e.charAt(i)}}}return t},_get:function(e,t){return e.settings[t]!==undefined?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()==e.lastVal){return}var n=this._get(e,"dateFormat");var r=e.lastVal=e.input?e.input.val():null;var i,s;i=s=this._getDefaultDate(e);var o=this._getFormatConfig(e);try{i=this.parseDate(n,r,o)||s}catch(u){this.log(u);r=t?"":r}e.selectedDay=i.getDate();e.drawMonth=e.selectedMonth=i.getMonth();e.drawYear=e.selectedYear=i.getFullYear();e.currentDay=r?i.getDate():0;e.currentMonth=r?i.getMonth():0;e.currentYear=r?i.getFullYear():0;this._adjustInstDate(e)},_getDefaultDate:function(e){this.CDate=this._get(e,"calendar");return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new this.CDate))},_determineDate:function(e,t,n){var r=this.CDate;var i=function(e){var t=new r;t.setDate(t.getDate()+e);return t};var s=function(t){try{return hs.datepicker.parseDate(hs.datepicker._get(e,"dateFormat"),t,hs.datepicker._getFormatConfig(e))}catch(n){}var i=(t.toLowerCase().match(/^c/)?hs.datepicker._getDate(e):null)||new r;var s=i.getFullYear();var o=i.getMonth();var u=i.getDate();var a=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var f=a.exec(t);while(f){switch(f[2]||"d"){case"d":case"D":u+=parseInt(f[1],10);break;case"w":case"W":u+=parseInt(f[1],10)*7;break;case"m":case"M":o+=parseInt(f[1],10);u=Math.min(u,hs.datepicker._getDaysInMonth(s,o));break;case"y":case"Y":s+=parseInt(f[1],10);u=Math.min(u,hs.datepicker._getDaysInMonth(s,o));break}f=a.exec(t)}return new r(s,o,u)};var o=t==null||t===""?n:typeof t=="string"?s(t):typeof t=="number"?isNaN(t)?n:i(t):new r(t.getTime());o=o&&o.toString()=="Invalid Date"?n:o;if(o){o.setHours(0);o.setMinutes(0);o.setSeconds(0);o.setMilliseconds(0)}return this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(e){if(!e){return null}e.setHours(e.getHours()>12?e.getHours()+2:0);return e},_setDate:function(e,t,n){var r=!t;var i=e.selectedMonth;var s=e.selectedYear;this.CDate=this._get(e,"calendar");var o=this._restrictMinMax(e,this._determineDate(e,t,new this.CDate));e.selectedDay=e.currentDay=o.getDate();e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth();e.drawYear=e.selectedYear=e.currentYear=o.getFullYear();if((i!=e.selectedMonth||s!=e.selectedYear)&&!n){this._notifyChange(e)}this._adjustInstDate(e);if(e.input){e.input.val(r?"":this._formatDate(e))}},_getDate:function(e){this.CDate=this._get(e,"calendar");var t=!e.currentYear||e.input&&e.input.val()==""?null:this._daylightSavingAdjust(new this.CDate(e.currentYear,e.currentMonth,e.currentDay));return t},_generateHTML:function(e){var t=new this.CDate;t=this._daylightSavingAdjust(new this.CDate(t.getFullYear(),t.getMonth(),t.getDate()));var n=this._get(e,"isRTL");var r=this._get(e,"showButtonPanel");var i=this._get(e,"hideIfNoPrevNext");var s=this._get(e,"navigationAsDateFormat");var o=this._getNumberOfMonths(e);var u=this._get(e,"showCurrentAtPos");var a=this._get(e,"stepMonths");var f=o[0]!=1||o[1]!=1;var l=this._daylightSavingAdjust(!e.currentDay?new Date(9999,9,9):new this.CDate(e.currentYear,e.currentMonth,e.currentDay));var c=this._getMinMaxDate(e,"min");var h=this._getMinMaxDate(e,"max");var p=e.drawMonth-u;var d=e.drawYear;if(p<0){p+=12;d--}if(h){var v=this._daylightSavingAdjust(new this.CDate(h.getFullYear(),h.getMonth()-o[0]*o[1]+1,h.getDate()));v=c&&this._compareDate(v,"<",c)?c:v;while(this._daylightSavingAdjust(new this.CDate(d,p,1))>v){p--;if(p<0){p=11;d--}}}e.drawMonth=p;e.drawYear=d;var m=this._get(e,"prevText");m=!s?m:this.formatDate(m,this._daylightSavingAdjust(new this.CDate(d,p-a,1)),this._getFormatConfig(e));var g=this._canAdjustMonth(e,-1,d,p)?'<a style="direction:ltr" class="ui-datepicker-prev ui-corner-all" onclick="DP_hs_'+dpuuid+".datepicker._adjustDate('#"+e.id+"', -"+a+", 'M');\" title=\""+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+m+"</span></a>":i?"":'<a style="direction:ltr" class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+m+"</span></a>";var y=this._get(e,"nextText");y=!s?y:this.formatDate(y,this._daylightSavingAdjust(new this.CDate(d,p+a,1)),this._getFormatConfig(e));var b=this._canAdjustMonth(e,+1,d,p)?'<a style="direction:ltr" class="ui-datepicker-next ui-corner-all" onclick="DP_hs_'+dpuuid+".datepicker._adjustDate('#"+e.id+"', +"+a+", 'M');\" title=\""+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+y+"</span></a>":i?"":'<a style="direction:ltr" class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+y+"</span></a>";var w=this._get(e,"currentText");var E=this._get(e,"gotoCurrent")&&e.currentDay?l:t;w=!s?w:this.formatDate(w,E,this._getFormatConfig(e));var S=!e.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_hs_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(e,"closeText")+"</button>":"";var x=r?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(n?S:"")+(this._isInRange(e,E)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_hs_'+dpuuid+".datepicker._gotoToday('#"+e.id+"');\">"+w+"</button>":"")+(n?"":S)+"</div>":"";var T=parseInt(this._get(e,"firstDay"),10);T=isNaN(T)?0:T;var N=this._get(e,"showWeek");var C=this._get(e,"dayNames");var k=this._get(e,"dayNamesShort");var L=this._get(e,"dayNamesMin");var A=this._get(e,"monthNames");var O=this._get(e,"monthNamesShort");var M=this._get(e,"beforeShowDay");var _=this._get(e,"showOtherMonths");var D=this._get(e,"selectOtherMonths");var P=this._get(e,"calculateWeek")||this.iso8601Week;var H=this._getDefaultDate(e);var B="";for(var j=0;j<o[0];j++){var F="";this.maxRows=4;for(var I=0;I<o[1];I++){var q=this._daylightSavingAdjust(new this.CDate(d,p,e.selectedDay));var R=" ui-corner-all";var U="";if(f){U+='<div class="ui-datepicker-group';if(o[1]>1){switch(I){case 0:U+=" ui-datepicker-group-first";R=" ui-corner-"+(n?"right":"left");break;case o[1]-1:U+=" ui-datepicker-group-last";R=" ui-corner-"+(n?"left":"right");break;default:U+=" ui-datepicker-group-middle";R="";break}}U+='">'}U+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+R+'">'+(/all|left/.test(R)&&j==0?n?b:g:"")+(/all|right/.test(R)&&j==0?n?g:b:"")+this._generateMonthYearHeader(e,p,d,c,h,j>0||I>0,A,O)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var z=N?'<th class="ui-datepicker-week-col">'+this._get(e,"weekHeader")+"</th>":"";for(var W=0;W<7;W++){var X=(W+T)%7;z+="<th"+((W+T+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+C[X]+'">'+L[X]+"</span></th>"}U+=z+"</tr></thead><tbody>";var V=this._getDaysInMonth(d,p);if(d==e.selectedYear&&p==e.selectedMonth){e.selectedDay=Math.min(e.selectedDay,V)}var $=(this._getFirstDayOfMonth(d,p)-T+7)%7;var J=Math.ceil(($+V)/7);var K=f?this.maxRows>J?this.maxRows:J:J;this.maxRows=K;var Q=this._daylightSavingAdjust(new this.CDate(d,p,1-$));for(var G=0;G<K;G++){U+="<tr>";var Y=!N?"":'<td class="ui-datepicker-week-col">'+this._get(e,"calculateWeek")(Q)+"</td>";for(var W=0;W<7;W++){var Z=M?M.apply(e.input?e.input[0]:null,[Q]):[true,""];var et=Q.getMonth()!=p;var tt=et&&!D||!Z[0]||c&&this._compareDate(Q,"<",c)||h&&this._compareDate(Q,">",h);Y+='<td class="'+((W+T+6)%7>=5?" ui-datepicker-week-end":"")+(et?" ui-datepicker-other-month":"")+(Q.getTime()==q.getTime()&&p==e.selectedMonth&&e._keyEvent||H.getTime()==Q.getTime()&&H.getTime()==q.getTime()?" "+this._dayOverClass:"")+(tt?" "+this._unselectableClass+" ui-state-disabled":"")+(et&&!_?"":" "+Z[1]+(Q.getTime()==l.getTime()?" "+this._currentClass:"")+(Q.getTime()==t.getTime()?" ui-datepicker-today":""))+'"'+((!et||_)&&Z[2]?' title="'+Z[2]+'"':"")+(tt?"":' onclick="DP_hs_'+dpuuid+".datepicker._selectDay('#"+e.id+"',"+Q.getMonth()+","+Q.getFullYear()+', this);return false;"')+">"+(et&&!_?" ":tt?'<span class="ui-state-default">'+Q.getDate()+"</span>":'<a class="ui-state-default'+(Q.getTime()==t.getTime()?" ui-state-highlight":"")+(Q.getTime()==l.getTime()?" ui-state-active":"")+(et?" ui-priority-secondary":"")+'" href="#">'+Q.getDate()+"</a>")+"</td>";Q.setDate(Q.getDate()+1);Q=this._daylightSavingAdjust(Q)}U+=Y+"</tr>"}p++;if(p>11){p=0;d++}U+="</tbody></table>"+(f?"</div>"+(o[0]>0&&I==o[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");F+=U}B+=F}B+=x+(hs.browser.msie&&parseInt(hs.browser.version,10)<7&&!e.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");e._keyEvent=false;return B},_generateMonthYearHeader:function(e,t,n,r,i,s,o,u){var a=this._get(e,"changeMonth");var f=this._get(e,"changeYear");var l=this._get(e,"showMonthAfterYear");var c='<div class="ui-datepicker-title">';var h="";if(s||!a){h+='<span class="ui-datepicker-month">'+o[t]+"</span>"}else{var p=r&&r.getFullYear()==n;var d=i&&i.getFullYear()==n;h+='<select class="ui-datepicker-month" onchange="DP_hs_'+dpuuid+".datepicker._selectMonthYear('#"+e.id+"', this, 'M');\" onclick=\"DP_hs_"+dpuuid+".datepicker._clickMonthYear('#"+e.id+"');\">";for(var v=0;v<12;v++){if((!p||v>=r.getMonth())&&(!d||v<=i.getMonth())){h+='<option value="'+v+'"'+(v==t?' selected="selected"':"")+">"+u[v]+"</option>"}}h+="</select>"}if(!l){c+=h+(s||!(a&&f)?" ":"")}if(!e.yearshtml){e.yearshtml="";if(s||!f){c+='<span class="ui-datepicker-year">'+n+"</span>"}else{var m=this._get(e,"yearRange").split(":");var g=(new this.CDate).getFullYear();var y=function(e){var t=e.match(/c[+-].*/)?n+parseInt(e.substring(1),10):e.match(/[+-].*/)?g+parseInt(e,10):parseInt(e,10);return isNaN(t)?g:t};var b=y(m[0]);var w=Math.max(b,y(m[1]||""));b=r?Math.max(b,r.getFullYear()):b;w=i?Math.min(w,i.getFullYear()):w;e.yearshtml+='<select class="ui-datepicker-year" onchange="DP_hs_'+dpuuid+".datepicker._selectMonthYear('#"+e.id+"', this, 'Y');\" onclick=\"DP_hs_"+dpuuid+".datepicker._clickMonthYear('#"+e.id+"');\">";for(;b<=w;b++){e.yearshtml+='<option value="'+b+'"'+(b==n?' selected="selected"':"")+">"+b+"</option>"}e.yearshtml+="</select>";c+=e.yearshtml;e.yearshtml=null}}c+=this._get(e,"yearSuffix");if(l){c+=(s||!(a&&f)?" ":"")+h}c+="</div>";return c},_adjustInstDate:function(e,t,n){var r=e.drawYear+(n=="Y"?t:0);var i=e.drawMonth+(n=="M"?t:0);var s=Math.min(e.selectedDay,this._getDaysInMonth(r,i))+(n=="D"?t:0);var o=this._restrictMinMax(e,this._daylightSavingAdjust(new this.CDate(r,i,s)));e.selectedDay=o.getDate();e.drawMonth=e.selectedMonth=o.getMonth();e.drawYear=e.selectedYear=o.getFullYear();if(n=="M"||n=="Y"){this._notifyChange(e)}},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min");var r=this._getMinMaxDate(e,"max");var i=n&&this._compareDate(t,"<",n)?n:t;i=r&&this._compareDate(i,">",r)?r:i;return i},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");if(t){t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])}},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return t==null?[1,1]:typeof t=="number"?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new this.CDate(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return(new this.CDate(e,t,1)).getDay()},_canAdjustMonth:function(e,t,n,r){var i=this._getNumberOfMonths(e);var s=this._daylightSavingAdjust(new this.CDate(n,r+(t<0?t:i[0]*i[1]),1));if(t<0){s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth()))}return this._isInRange(e,s)},_isInRange:function(e,t){var n=this._getMinMaxDate(e,"min");var r=this._getMinMaxDate(e,"max");return(!n||t.getTime()>=n.getTime())&&(!r||t.getTime()<=r.getTime())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");this.CDate=this._get(e,"calendar");t=typeof t!="string"?t:(new this.CDate).getFullYear()%100+parseInt(t,10);return{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,r){if(!t){e.currentDay=e.selectedDay;e.currentMonth=e.selectedMonth;e.currentYear=e.selectedYear}var i=t?typeof t=="object"?t:this._daylightSavingAdjust(new this.CDate(r,n,t)):this._daylightSavingAdjust(new this.CDate(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))},_compareDate:function(e,t,n){if(e&&n){if(e.getGregorianDate){e=e.getGregorianDate()}if(n.getGregorianDate){n=n.getGregorianDate()}if(t=="<"){return e<n}return e>n}else{return null}}});hs.fn.datepicker=function(e){if(!this.length){return this}if(!hs.datepicker.initialized){hs(document).mousedown(hs.datepicker._checkExternalClick).find("body").append(hs.datepicker.dpDiv);hs.datepicker.initialized=true}var t=Array.prototype.slice.call(arguments,1);if(typeof e=="string"&&(e=="isDisabled"||e=="getDate"||e=="widget")){return hs.datepicker["_"+e+"Datepicker"].apply(hs.datepicker,[this[0]].concat(t))}if(e=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return hs.datepicker["_"+e+"Datepicker"].apply(hs.datepicker,[this[0]].concat(t))}return this.each(function(){typeof e=="string"?hs.datepicker["_"+e+"Datepicker"].apply(hs.datepicker,[this].concat(t)):hs.datepicker._attachDatepicker(this,e)})};hs.datepicker=new Datepicker;hs.datepicker.initialized=false;hs.datepicker.uuid=(new Date).getTime();hs.datepicker.version="1.8.14";window["DP_hs_"+dpuuid]=hs;var GREGORIAN_EPOCH=1721425.5;var ISLAMIC_EPOCH=1948439.5;var PERSIAN_EPOCH=1948320.5;hs(function(e){e.datepicker.regional.fa={calendar:JalaliDate,closeText:"بستن",prevText:"قبل",nextText:"بعد",currentText:"امروز",monthNames:["فروردين","ارديبهشت","خرداد","تير","مرداد","شهريور","مهر","آبان","آذر","دي","بهمن","اسفند"],monthNamesShort:["فروردين","ارديبهشت","خرداد","تير","مرداد","شهريور","مهر","آبان","آذر","دي","بهمن","اسفند"],dayNames:["يکشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],dayNamesShort:["يک","دو","سه","چهار","پنج","جمعه","شنبه"],dayNamesMin:["ي","د","س","چ","پ","ج","ش"],weekHeader:"ه",dateFormat:"dd/mm/yy",firstDay:6,isRTL:true,showMonthAfterYear:false,yearSuffix:"",calculateWeek:function(e){var t=new JalaliDate(e.getFullYear(),e.getMonth(),e.getDate()+(e.getDay()||7)-3);return Math.floor(Math.round((t.getTime()-(new JalaliDate(t.getFullYear(),0,1)).getTime())/864e5)/7)+1}};e.datepicker.setDefaults(e.datepicker.regional.fa)});})
|
2 |
-
jQuery(document).ready(gformInitDatepicker);
|
3 |
-
function gformInitDatepicker() {
|
4 |
-
jQuery('.datepicker').each(function () {
|
5 |
-
var element = jQuery(this),
|
6 |
-
inputId = this.id,
|
7 |
-
optionsObj = {
|
8 |
-
yearRange: '-100:+20',
|
9 |
-
showOn: 'focus',
|
10 |
-
dateFormat: 'mm/dd/yy',
|
11 |
-
changeMonth: true,
|
12 |
-
changeYear: true,
|
13 |
-
onClose: function () {
|
14 |
-
element.closest('li').nextAll('li:visible:first').find(':input:first').focus();
|
15 |
-
}
|
16 |
-
};
|
17 |
-
if (element.hasClass('dmy')) {
|
18 |
-
optionsObj.dateFormat = 'dd/mm/yy';
|
19 |
-
} else if (element.hasClass('dmy_dash')) {
|
20 |
-
optionsObj.dateFormat = 'dd-mm-yy';
|
21 |
-
} else if (element.hasClass('dmy_dot')) {
|
22 |
-
optionsObj.dateFormat = 'dd.mm.yy';
|
23 |
-
} else if (element.hasClass('ymd_slash')) {
|
24 |
-
optionsObj.dateFormat = 'yy/mm/dd';
|
25 |
-
} else if (element.hasClass('ymd_dash')) {
|
26 |
-
optionsObj.dateFormat = 'yy-mm-dd';
|
27 |
-
} else if (element.hasClass('ymd_dot')) {
|
28 |
-
optionsObj.dateFormat = 'yy.mm.dd';
|
29 |
-
}
|
30 |
-
if (element.hasClass('datepicker_with_icon')) {
|
31 |
-
optionsObj.showOn = 'both';
|
32 |
-
optionsObj.buttonImage = jQuery('#gforms_calendar_icon_' + inputId).val();
|
33 |
-
optionsObj.buttonImageOnly = true;
|
34 |
-
}
|
35 |
-
inputId = inputId.split('_');
|
36 |
-
optionsObj = gform.applyFilters('gform_datepicker_options_pre_init', optionsObj, inputId[1], inputId[2]);
|
37 |
-
element.datepicker(optionsObj);
|
38 |
-
});
|
39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/iran-cities.js
ADDED
@@ -0,0 +1,2874 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Created by HANNANStd on 3/1/2016.
|
3 |
+
*/
|
4 |
+
function gform_iranCities(province) {
|
5 |
+
|
6 |
+
var cities = {};
|
7 |
+
|
8 |
+
switch (province.toLowerCase()) {
|
9 |
+
|
10 |
+
case 'تهران':
|
11 |
+
case 'tehran':
|
12 |
+
cities[1] = new Array('شهر قدس ', '3619');
|
13 |
+
cities[2] = new Array('پردیس ', '5588');
|
14 |
+
cities[3] = new Array('نسیم شهر ', '5589');
|
15 |
+
cities[4] = new Array('گلستان ', '5590');
|
16 |
+
cities[5] = new Array('قرچک ', '5591');
|
17 |
+
cities[6] = new Array('دماوند ', '3633');
|
18 |
+
cities[7] = new Array('فیروزکوه ', '3634');
|
19 |
+
cities[8] = new Array('ورامین ', '3592');
|
20 |
+
cities[9] = new Array('پیشوا ', '3593');
|
21 |
+
cities[10] = new Array('جاجرود ', '3594');
|
22 |
+
cities[11] = new Array('لواسان ', '3588');
|
23 |
+
cities[12] = new Array('شهریار ', '3589');
|
24 |
+
cities[13] = new Array('فردوس ', '3590');
|
25 |
+
cities[15] = new Array('تجزیه مبادلات لشکر ', '3578');
|
26 |
+
// cities[14] = new Array('منطقه 11 پستی تهران ', '3577');
|
27 |
+
// cities[16] = new Array('منطقه 13 پستی تهران ', '3579');
|
28 |
+
// cities[17] = new Array('منطقه 14 پستی تهران ', '3580');
|
29 |
+
// cities[18] = new Array('منطقه 15 پستی تهران ', '3581');
|
30 |
+
// cities[19] = new Array('منطقه 16 پستی تهران ', '3582');
|
31 |
+
// cities[20] = new Array('منطقه 17 پستی تهران ', '3583');
|
32 |
+
// cities[21] = new Array('منطقه 18 پستی تهران ', '3584');
|
33 |
+
// cities[22] = new Array('منطقه 19 پستی تهران ', '3585');
|
34 |
+
cities[23] = new Array('ری ', '3586');
|
35 |
+
cities[24] = new Array('برغان ', '3851');
|
36 |
+
cities[25] = new Array('رامجین ', '3852');
|
37 |
+
cities[26] = new Array('کوهسار ', '3853');
|
38 |
+
cities[27] = new Array('شهراسر ', '3854');
|
39 |
+
cities[28] = new Array('منگلان ', '3855');
|
40 |
+
cities[29] = new Array('طالقان ', '3856');
|
41 |
+
cities[30] = new Array('قلعه سین ', '3857');
|
42 |
+
cities[31] = new Array('خیرآبادخالصه ', '3858');
|
43 |
+
cities[32] = new Array('عسگرآبادعباسی ', '3859');
|
44 |
+
cities[33] = new Array('دهماسین ', '3860');
|
45 |
+
cities[34] = new Array('باغ خواص ', '3861');
|
46 |
+
cities[35] = new Array('ایجدان ', '3862');
|
47 |
+
cities[36] = new Array('آب باریک ', '3863');
|
48 |
+
cities[37] = new Array('جواد آباد ', '3864');
|
49 |
+
cities[38] = new Array('خاوه ', '3865');
|
50 |
+
cities[39] = new Array('محمودآبادعرب ', '3866');
|
51 |
+
cities[40] = new Array('جلیل آباد ', '3867');
|
52 |
+
cities[41] = new Array('کریم آباد ', '3868');
|
53 |
+
cities[42] = new Array('قلعه خواجه ', '3869');
|
54 |
+
cities[43] = new Array('داودآباد ', '3870');
|
55 |
+
cities[44] = new Array('پاکدشت ', '3871');
|
56 |
+
cities[45] = new Array('شریف آباد ', '3872');
|
57 |
+
cities[46] = new Array('پارچین ', '3873');
|
58 |
+
cities[47] = new Array('حصارامیر ', '3874');
|
59 |
+
cities[48] = new Array('خاتون آباد ', '3875');
|
60 |
+
cities[49] = new Array('آتشگاه ', '3822');
|
61 |
+
cities[50] = new Array('احمدآبادمستوفی ', '3823');
|
62 |
+
cities[51] = new Array('اسلام شهر ', '3824');
|
63 |
+
cities[52] = new Array('مروزبهرام ', '3825');
|
64 |
+
cities[53] = new Array('گلدسته ', '3826');
|
65 |
+
cities[54] = new Array('صالح آباد ', '3827');
|
66 |
+
cities[55] = new Array('واوان ', '3828');
|
67 |
+
cities[56] = new Array('شاتره ', '3829');
|
68 |
+
cities[57] = new Array('میان آباد ', '3830');
|
69 |
+
cities[58] = new Array('چهاردانگه ', '3831');
|
70 |
+
cities[59] = new Array('فخرایران ', '3832');
|
71 |
+
cities[60] = new Array('احمدآبادمصدق ', '3833');
|
72 |
+
cities[61] = new Array('نجم آباد ', '3834');
|
73 |
+
cities[62] = new Array('تنگمان ', '3835');
|
74 |
+
cities[63] = new Array('سعیدآباد ', '3836');
|
75 |
+
cities[64] = new Array('هیو ', '3837');
|
76 |
+
cities[65] = new Array('حومه گلندوک ', '3838');
|
77 |
+
cities[66] = new Array('اوشان ', '3839');
|
78 |
+
cities[67] = new Array('میگون ', '3840');
|
79 |
+
cities[68] = new Array('فشم ', '3841');
|
80 |
+
cities[69] = new Array('لوسان بزرگ ', '3842');
|
81 |
+
cities[70] = new Array('شهریاربردآباد ', '3843');
|
82 |
+
cities[71] = new Array('قاسم آبادقندیشاد ', '3844');
|
83 |
+
cities[72] = new Array('باغستان ', '3845');
|
84 |
+
cities[73] = new Array('شهرآباد ', '3846');
|
85 |
+
cities[74] = new Array('شاهدشهر ', '3847');
|
86 |
+
cities[75] = new Array('ملارد ', '3848');
|
87 |
+
cities[76] = new Array('لم آباد ', '3849');
|
88 |
+
cities[77] = new Array('خسروآباد ', '3786');
|
89 |
+
cities[78] = new Array('بومهن ', '3787');
|
90 |
+
cities[79] = new Array('شهرجدیدپردیس ', '3788');
|
91 |
+
cities[80] = new Array('خرمدشت ', '3789');
|
92 |
+
cities[81] = new Array('باقر شهر ', '3790');
|
93 |
+
cities[82] = new Array('جعفرآباد ', '3791');
|
94 |
+
cities[83] = new Array('مرقدامام ', '3792');
|
95 |
+
cities[84] = new Array('کهریزک ', '3793');
|
96 |
+
cities[85] = new Array('تورقوزآباد ', '3794');
|
97 |
+
cities[86] = new Array('شورآباد ', '3795');
|
98 |
+
cities[87] = new Array('قمصر ', '3796');
|
99 |
+
cities[88] = new Array('حسن آباد ', '3797');
|
100 |
+
cities[89] = new Array('شمس آباد ', '3798');
|
101 |
+
cities[90] = new Array('ابراهیم آباد ', '3799');
|
102 |
+
cities[91] = new Array('چرمسازی سالاریه ', '3800');
|
103 |
+
cities[92] = new Array('قلعه محمدعلیخان ', '3801');
|
104 |
+
cities[93] = new Array('فرودگاه امام خمینی ', '3802');
|
105 |
+
cities[94] = new Array('وهن آباد ', '3803');
|
106 |
+
cities[95] = new Array('قلعه نوخالصه ', '3804');
|
107 |
+
cities[96] = new Array('گل تپه کبیر ', '3805');
|
108 |
+
cities[97] = new Array('محمودآبادپیرزاد ', '3806');
|
109 |
+
cities[98] = new Array('فرون آباد ', '3807');
|
110 |
+
cities[99] = new Array('خاورشهر ', '3808');
|
111 |
+
cities[100] = new Array('اسلام آباد ', '3809');
|
112 |
+
cities[101] = new Array('لپهزنگ ', '3810');
|
113 |
+
cities[102] = new Array('قیام دشت ', '3811');
|
114 |
+
cities[103] = new Array('قرچحصار ', '3812');
|
115 |
+
cities[104] = new Array('خلاریز ', '3813');
|
116 |
+
cities[105] = new Array('سوهانک ', '3814');
|
117 |
+
cities[106] = new Array('پس قلعه ', '3815');
|
118 |
+
cities[107] = new Array('درکه ', '3816');
|
119 |
+
cities[108] = new Array('ادران ', '3817');
|
120 |
+
cities[109] = new Array('آسارا ', '3818');
|
121 |
+
cities[110] = new Array('نساء ', '3819');
|
122 |
+
cities[111] = new Array('پلنگ آباد ', '3820');
|
123 |
+
cities[112] = new Array('شهرقدس(مویز) ', '4003');
|
124 |
+
cities[113] = new Array('اندیشه ', '4004');
|
125 |
+
cities[114] = new Array('مارلیک ', '4005');
|
126 |
+
cities[115] = new Array('نصیرآباد ', '4006');
|
127 |
+
cities[116] = new Array('رزگان ', '4007');
|
128 |
+
cities[117] = new Array('گلمه ', '4008');
|
129 |
+
cities[118] = new Array('پرند ', '4009');
|
130 |
+
cities[119] = new Array('سلطان آباد ', '4010');
|
131 |
+
cities[120] = new Array('گلستان ', '4011');
|
132 |
+
cities[121] = new Array('اسماعیل آباد ', '4012');
|
133 |
+
cities[122] = new Array('اکبرآباد ', '4013');
|
134 |
+
cities[123] = new Array('نصیرآبادقاجار ', '4014');
|
135 |
+
cities[124] = new Array('منجیل آباد ', '4015');
|
136 |
+
cities[125] = new Array('جابان ', '4109');
|
137 |
+
cities[126] = new Array('رودهن ', '4110');
|
138 |
+
cities[127] = new Array('گیلاوند ', '4111');
|
139 |
+
cities[128] = new Array('آبعلی ', '4112');
|
140 |
+
cities[129] = new Array('کیلان ', '4113');
|
141 |
+
cities[130] = new Array('آبسرد ', '4114');
|
142 |
+
cities[131] = new Array('سربندان ', '4115');
|
143 |
+
cities[132] = new Array('مشاء ', '4116');
|
144 |
+
cities[133] = new Array('مراء ', '4117');
|
145 |
+
cities[134] = new Array('هرانده ', '4118');
|
146 |
+
cities[135] = new Array('درده ', '4119');
|
147 |
+
cities[136] = new Array('حصارین ', '4120');
|
148 |
+
cities[137] = new Array('ارجمند ', '4121');
|
149 |
+
cities[138] = new Array('امیریه ', '4122');
|
150 |
+
cities[139] = new Array('گرمدره ', '4123');
|
151 |
+
cities[140] = new Array('تهران', '3322');
|
152 |
+
break;
|
153 |
+
|
154 |
+
case 'گیلان':
|
155 |
+
case 'guilan':
|
156 |
+
case 'gilan':
|
157 |
+
cities[1] = new Array('رودبنه ', '5607');
|
158 |
+
cities[2] = new Array('آبکنار ', '3636');
|
159 |
+
cities[3] = new Array('خمام ', '3637');
|
160 |
+
cities[4] = new Array('فومن ', '3638');
|
161 |
+
cities[5] = new Array('صومعه سرا ', '3639');
|
162 |
+
cities[6] = new Array('هشتپر ـ طوالش ', '3640');
|
163 |
+
cities[7] = new Array('ماسال ', '3641');
|
164 |
+
cities[8] = new Array('آستارا ', '3642');
|
165 |
+
cities[9] = new Array('سیاهکل ', '3643');
|
166 |
+
cities[10] = new Array('آستانه اشرفیه ', '3644');
|
167 |
+
cities[11] = new Array('منجیل ', '3645');
|
168 |
+
cities[12] = new Array('رودبار ', '3646');
|
169 |
+
cities[13] = new Array('لنگرود ', '3647');
|
170 |
+
cities[14] = new Array('رودسر ', '3648');
|
171 |
+
cities[15] = new Array('کلاچای ', '3649');
|
172 |
+
cities[16] = new Array('کپورچال ', '4124');
|
173 |
+
cities[17] = new Array('جیرهنده لشت نشا ', '4125');
|
174 |
+
cities[18] = new Array('لیجارکی ', '4126');
|
175 |
+
cities[19] = new Array('سنگر ', '4127');
|
176 |
+
cities[20] = new Array('اسلام آباد ', '4128');
|
177 |
+
cities[21] = new Array('سراوان ', '4129');
|
178 |
+
cities[22] = new Array('خشک بیجار ', '4130');
|
179 |
+
cities[23] = new Array('لشت نشا ', '4131');
|
180 |
+
cities[24] = new Array('پیربست لولمان ', '4132');
|
181 |
+
cities[25] = new Array('خاچکین ', '4133');
|
182 |
+
cities[26] = new Array('کوچصفهان ', '4134');
|
183 |
+
cities[27] = new Array('بلسبنه ', '4135');
|
184 |
+
cities[28] = new Array('چاپارخانه ', '4136');
|
185 |
+
cities[29] = new Array('جیرکویه ', '4137');
|
186 |
+
cities[30] = new Array('لولمان ', '4138');
|
187 |
+
cities[31] = new Array('شفت ', '4139');
|
188 |
+
cities[32] = new Array('ملاسرا ', '4140');
|
189 |
+
cities[33] = new Array('چوبر ', '4141');
|
190 |
+
cities[34] = new Array('ماسوله ', '4142');
|
191 |
+
cities[35] = new Array('گشت ', '4143');
|
192 |
+
cities[36] = new Array('احمد سرگوراب ', '4144');
|
193 |
+
cities[37] = new Array('مرجقل ', '4145');
|
194 |
+
cities[38] = new Array('گورابزرمیخ ', '4146');
|
195 |
+
cities[39] = new Array('طاهر گوداب ', '4147');
|
196 |
+
cities[40] = new Array('ضیابر ', '4148');
|
197 |
+
cities[41] = new Array('مرکیه ', '4149');
|
198 |
+
cities[42] = new Array('هنده خاله ', '4150');
|
199 |
+
cities[43] = new Array('نوخاله اکبر ', '4151');
|
200 |
+
cities[44] = new Array('بازاراسالم ', '4152');
|
201 |
+
cities[45] = new Array('شیلهوشت ', '4153');
|
202 |
+
cities[46] = new Array('جوکندان ', '4154');
|
203 |
+
cities[47] = new Array('لیسار ', '4155');
|
204 |
+
cities[48] = new Array('خطبه سرا ', '4156');
|
205 |
+
cities[49] = new Array('حویق ', '4157');
|
206 |
+
cities[50] = new Array('پلاسی ', '4158');
|
207 |
+
cities[51] = new Array('ویسادار ', '4159');
|
208 |
+
cities[52] = new Array('رضوان شهر ', '4160');
|
209 |
+
cities[53] = new Array('شاندرمن ', '4161');
|
210 |
+
cities[54] = new Array('پرهسر ', '4162');
|
211 |
+
cities[55] = new Array('پلنک پاره ', '4163');
|
212 |
+
cities[56] = new Array('بازارجمعه شاندرمن ', '4164');
|
213 |
+
cities[57] = new Array('اسالم ', '4165');
|
214 |
+
cities[58] = new Array('شیخ محله ', '4166');
|
215 |
+
cities[59] = new Array('ویرمونی ', '4167');
|
216 |
+
cities[60] = new Array('سیبلی ', '4168');
|
217 |
+
cities[61] = new Array('لوندویل ', '4169');
|
218 |
+
cities[62] = new Array('شند ', '4170');
|
219 |
+
cities[63] = new Array('کوتهکومه ', '4171');
|
220 |
+
cities[64] = new Array('حیران علیا ', '4172');
|
221 |
+
cities[65] = new Array('پاشاکی ', '4173');
|
222 |
+
cities[66] = new Array('گرماور ', '4174');
|
223 |
+
cities[67] = new Array('لیش ', '4175');
|
224 |
+
cities[68] = new Array('بادکوسرا ', '4176');
|
225 |
+
cities[69] = new Array('شیرین نسائ ', '4177');
|
226 |
+
cities[70] = new Array('خرارود ', '4178');
|
227 |
+
cities[71] = new Array('دیلمان ', '4179');
|
228 |
+
cities[72] = new Array('لسکوکلایه ', '4180');
|
229 |
+
cities[73] = new Array('کیسم ', '4181');
|
230 |
+
cities[74] = new Array('شیرکوه چهارده ', '4182');
|
231 |
+
cities[75] = new Array('دهشال ', '4183');
|
232 |
+
cities[76] = new Array('کیاشهر ', '4184');
|
233 |
+
cities[77] = new Array('دستک ', '4185');
|
234 |
+
cities[78] = new Array('پرگاپشت مهدیقانی ', '4186');
|
235 |
+
cities[79] = new Array('لوشان ', '4187');
|
236 |
+
cities[80] = new Array('بیورزین ', '4188');
|
237 |
+
cities[81] = new Array('جیرنده ', '4189');
|
238 |
+
cities[82] = new Array('برهسر ', '4190');
|
239 |
+
cities[83] = new Array('ویشان ', '4191');
|
240 |
+
cities[84] = new Array('کلیشم ', '4192');
|
241 |
+
cities[85] = new Array('علی آباد کلشتر ', '4193');
|
242 |
+
cities[86] = new Array('رستم آباد ', '4194');
|
243 |
+
cities[87] = new Array('توتکابن ', '4195');
|
244 |
+
cities[88] = new Array('کلشتر ', '4196');
|
245 |
+
cities[89] = new Array('جوین ', '4197');
|
246 |
+
cities[90] = new Array('اسکلک ', '4198');
|
247 |
+
cities[91] = new Array('کوکنه ', '4199');
|
248 |
+
cities[92] = new Array('سلوش ', '4200');
|
249 |
+
cities[93] = new Array('چمخاله ', '4201');
|
250 |
+
cities[94] = new Array('شلمان ', '4202');
|
251 |
+
cities[95] = new Array('کومله ', '4203');
|
252 |
+
cities[96] = new Array('دیوشل ', '4204');
|
253 |
+
cities[97] = new Array('پروش پایین ', '4205');
|
254 |
+
cities[98] = new Array('اطاقور ', '4206');
|
255 |
+
cities[99] = new Array('قاسم آبادسفلی ', '4207');
|
256 |
+
cities[100] = new Array('حسن سرا ', '4208');
|
257 |
+
cities[101] = new Array('طوللات ', '4209');
|
258 |
+
cities[102] = new Array('رانکوه ', '4210');
|
259 |
+
cities[103] = new Array('چابکسر ', '4211');
|
260 |
+
cities[104] = new Array('جنگسرا ', '4212');
|
261 |
+
cities[105] = new Array('واجارگاه ', '4213');
|
262 |
+
cities[106] = new Array('رحیم آباد ', '4214');
|
263 |
+
cities[107] = new Array('بلترک ', '4215');
|
264 |
+
cities[108] = new Array('املش ', '4216');
|
265 |
+
cities[109] = new Array('پائین زربیجار ', '4217');
|
266 |
+
cities[110] = new Array('کجیر ', '4218');
|
267 |
+
cities[111] = new Array('گرمابدست ', '4219');
|
268 |
+
cities[112] = new Array('شوئیل ', '4220');
|
269 |
+
cities[113] = new Array('پونل ', '4221');
|
270 |
+
cities[114] = new Array('بندرانزلی ', '3519');
|
271 |
+
cities[115] = new Array('لاهیجان ', '3520');
|
272 |
+
cities[116] = new Array('رشت', '3361');
|
273 |
+
break;
|
274 |
+
|
275 |
+
case 'آذربایجان شرقی':
|
276 |
+
case 'azarbaijan - east':
|
277 |
+
case 'azarbaijan-east':
|
278 |
+
cities[1] = new Array('تبریز ', '3366');
|
279 |
+
cities[2] = new Array('میانه ', '3527');
|
280 |
+
cities[3] = new Array('مرند ', '3528');
|
281 |
+
cities[4] = new Array('مراغه ', '3529');
|
282 |
+
cities[5] = new Array('سبلان ', '3682');
|
283 |
+
cities[6] = new Array('شهر جدید سهند ', '3683');
|
284 |
+
cities[7] = new Array('اسکو ', '3684');
|
285 |
+
cities[8] = new Array('سردرود ', '3685');
|
286 |
+
cities[9] = new Array('آذرشهر ', '3686');
|
287 |
+
cities[10] = new Array('شبستر ', '3687');
|
288 |
+
cities[11] = new Array('هریس ', '3688');
|
289 |
+
cities[12] = new Array('هادیشهر ', '3689');
|
290 |
+
cities[13] = new Array('جلفا ', '3690');
|
291 |
+
cities[14] = new Array('اهر ', '3691');
|
292 |
+
cities[15] = new Array('کلیبر ', '3692');
|
293 |
+
cities[16] = new Array('سراب ', '3693');
|
294 |
+
cities[17] = new Array('بستان آباد ', '3694');
|
295 |
+
cities[18] = new Array('عجب شیر ', '3695');
|
296 |
+
cities[19] = new Array('بناب ', '3696');
|
297 |
+
cities[20] = new Array('ملکان ', '3697');
|
298 |
+
cities[21] = new Array('قره اغاج ـ چاراویماق ', '3698');
|
299 |
+
cities[22] = new Array('اغچه ریش ', '3699');
|
300 |
+
cities[23] = new Array('ترک ', '4383');
|
301 |
+
cities[24] = new Array('ترکمانچای ', '4384');
|
302 |
+
cities[25] = new Array('خاتون آباد ', '4385');
|
303 |
+
cities[26] = new Array('شیخدرآباد ', '4386');
|
304 |
+
cities[27] = new Array('قره بلاغ ', '4387');
|
305 |
+
cities[28] = new Array('آق کند ', '4388');
|
306 |
+
cities[29] = new Array('اچاچی ', '4389');
|
307 |
+
cities[30] = new Array('گوندوغدی ', '4390');
|
308 |
+
cities[31] = new Array('پورسخلو ', '4391');
|
309 |
+
cities[32] = new Array('کنگاور ', '4392');
|
310 |
+
cities[33] = new Array('قویوجاق ', '4393');
|
311 |
+
cities[34] = new Array('ارموداق ', '4394');
|
312 |
+
cities[35] = new Array('کهنمو ', '4395');
|
313 |
+
cities[36] = new Array('اربط ', '4396');
|
314 |
+
cities[37] = new Array('خسروشهر ', '4397');
|
315 |
+
cities[38] = new Array('لاهیجان ', '4398');
|
316 |
+
cities[39] = new Array('خاصبان ', '4399');
|
317 |
+
cities[40] = new Array('ایلخچی ', '4400');
|
318 |
+
cities[41] = new Array('سرایده ', '4401');
|
319 |
+
cities[42] = new Array('کجاآباد ', '4402');
|
320 |
+
cities[43] = new Array('خلجان ', '4403');
|
321 |
+
cities[44] = new Array('ینگی اسپران ', '4404');
|
322 |
+
cities[45] = new Array('باسمنج ', '4405');
|
323 |
+
cities[46] = new Array('شادبادمشایخ ', '4406');
|
324 |
+
cities[47] = new Array('کندرود ', '4407');
|
325 |
+
cities[48] = new Array('مایان سفلی ', '4408');
|
326 |
+
cities[49] = new Array('تیمورلو ', '4409');
|
327 |
+
cities[50] = new Array('قدمگاه ', '4410');
|
328 |
+
cities[51] = new Array('ممقان ', '4411');
|
329 |
+
cities[52] = new Array('گوگان ', '4412');
|
330 |
+
cities[53] = new Array('شیرامین ', '4413');
|
331 |
+
cities[54] = new Array('هفت چشمه ', '4414');
|
332 |
+
cities[55] = new Array('امند ', '4415');
|
333 |
+
cities[56] = new Array('خامنه ', '4416');
|
334 |
+
cities[57] = new Array('سیس ', '4417');
|
335 |
+
cities[58] = new Array('صوفیان ', '4418');
|
336 |
+
cities[59] = new Array('شندآباد ', '4419');
|
337 |
+
cities[60] = new Array('تسوج ', '4420');
|
338 |
+
cities[61] = new Array('شرفخانه ', '4421');
|
339 |
+
cities[62] = new Array('مینق ', '4422');
|
340 |
+
cities[63] = new Array('بخشایش ـ کلوانق ', '4423');
|
341 |
+
cities[64] = new Array('سرند ', '4424');
|
342 |
+
cities[65] = new Array('زرنق ', '4425');
|
343 |
+
cities[66] = new Array('بیلوردی ', '4426');
|
344 |
+
cities[67] = new Array('خواجه ', '4427');
|
345 |
+
cities[68] = new Array('گلین قیه ', '4428');
|
346 |
+
cities[69] = new Array('هرزندجدید ', '4429');
|
347 |
+
cities[70] = new Array('بناب جدید ـ مرند ', '4430');
|
348 |
+
cities[71] = new Array('زنوز ', '4431');
|
349 |
+
cities[72] = new Array('دولت آباد ', '4432');
|
350 |
+
cities[73] = new Array('یکان کهریز ', '4433');
|
351 |
+
cities[74] = new Array('یامچی ', '4434');
|
352 |
+
cities[75] = new Array('شجاع ', '4435');
|
353 |
+
cities[76] = new Array('داران ', '4436');
|
354 |
+
cities[77] = new Array('سیهرود ', '4437');
|
355 |
+
cities[78] = new Array('نوجهمهر ', '4438');
|
356 |
+
cities[79] = new Array('کشک سرای ', '4439');
|
357 |
+
cities[80] = new Array('خاروانا ', '4440');
|
358 |
+
cities[81] = new Array('هوراند ', '4441');
|
359 |
+
cities[82] = new Array('چولقشلاقی ', '4442');
|
360 |
+
cities[83] = new Array('ورگهان ', '4443');
|
361 |
+
cities[84] = new Array('افیل ', '4444');
|
362 |
+
cities[85] = new Array('اذغان ', '4445');
|
363 |
+
cities[86] = new Array('سیهکلان ', '4446');
|
364 |
+
cities[87] = new Array('ورزقان ', '4447');
|
365 |
+
cities[88] = new Array('اقبراز ', '4448');
|
366 |
+
cities[89] = new Array('مولان ', '4449');
|
367 |
+
cities[90] = new Array('خمارلو ', '4450');
|
368 |
+
cities[91] = new Array('عاشقلو ', '4451');
|
369 |
+
cities[92] = new Array('اسکلو ', '4452');
|
370 |
+
cities[93] = new Array('ابشاحمد ', '4453');
|
371 |
+
cities[94] = new Array('یوزبند ', '4454');
|
372 |
+
cities[95] = new Array('کاغذکنان ', '4455');
|
373 |
+
cities[96] = new Array('خداآفرین ', '4456');
|
374 |
+
cities[97] = new Array('کندوان ', '4457');
|
375 |
+
cities[98] = new Array('تیل ', '4458');
|
376 |
+
cities[99] = new Array('وایقان ', '4459');
|
377 |
+
cities[100] = new Array('لاریجان ', '4460');
|
378 |
+
cities[101] = new Array('اسب فروشان ', '4461');
|
379 |
+
cities[102] = new Array('ابرغان ', '4462');
|
380 |
+
cities[103] = new Array('شربیان ', '4463');
|
381 |
+
cities[104] = new Array('مهربان ', '4464');
|
382 |
+
cities[105] = new Array('رازلیق ', '4465');
|
383 |
+
cities[106] = new Array('اغمیون ', '4466');
|
384 |
+
cities[107] = new Array('اردها ', '4467');
|
385 |
+
cities[108] = new Array('قرهچای حاجعلی ', '4468');
|
386 |
+
cities[109] = new Array('قره بابا ', '4469');
|
387 |
+
cities[110] = new Array('سعیدآباد ', '4470');
|
388 |
+
cities[111] = new Array('الانق ', '4471');
|
389 |
+
cities[112] = new Array('کردکندی ', '4472');
|
390 |
+
cities[113] = new Array('قرهچمن ', '4473');
|
391 |
+
cities[114] = new Array('ورجوی ', '4474');
|
392 |
+
cities[115] = new Array('گلتپه ', '4475');
|
393 |
+
cities[116] = new Array('خراجو ', '4476');
|
394 |
+
cities[117] = new Array('داشاتان ', '4477');
|
395 |
+
cities[118] = new Array('داش بلاغ بازار ', '4478');
|
396 |
+
cities[119] = new Array('صومعه ', '4479');
|
397 |
+
cities[120] = new Array('علویان ', '4480');
|
398 |
+
cities[121] = new Array('شیراز ', '4481');
|
399 |
+
cities[122] = new Array('خضرلو ', '4482');
|
400 |
+
cities[123] = new Array('یگنجه ', '4483');
|
401 |
+
cities[124] = new Array('مهماندار ', '4484');
|
402 |
+
cities[125] = new Array('خانیان ', '4485');
|
403 |
+
cities[126] = new Array('دانالو ', '4486');
|
404 |
+
cities[127] = new Array('رحمانلو ', '4487');
|
405 |
+
cities[128] = new Array('زاوشت ', '4488');
|
406 |
+
cities[129] = new Array('القو ', '4489');
|
407 |
+
cities[130] = new Array('روشت بزرگ ', '4490');
|
408 |
+
cities[131] = new Array('خوشه مهر ', '4491');
|
409 |
+
cities[132] = new Array('زوارق ', '4492');
|
410 |
+
cities[133] = new Array('خانه برق ', '4493');
|
411 |
+
cities[134] = new Array('لکلر ', '4494');
|
412 |
+
cities[135] = new Array('بایقوت ', '4495');
|
413 |
+
cities[136] = new Array('اروق ', '4496');
|
414 |
+
cities[137] = new Array('اقمنار ', '4497');
|
415 |
+
cities[138] = new Array('لیلان ', '4498');
|
416 |
+
cities[139] = new Array('طوراغائی ', '4499');
|
417 |
+
cities[140] = new Array('هشترود ', '4500');
|
418 |
+
cities[141] = new Array('اوشندل ', '4501');
|
419 |
+
cities[142] = new Array('علی آبادعلیا ', '4502');
|
420 |
+
cities[143] = new Array('ذوالبین ', '4503');
|
421 |
+
cities[144] = new Array('نظرکهریزی ', '4504');
|
422 |
+
cities[145] = new Array('آتش بیگ ', '4505');
|
423 |
+
cities[146] = new Array('سلوک ', '4506');
|
424 |
+
cities[147] = new Array('نصیرآبادسفلی ', '4507');
|
425 |
+
cities[148] = new Array('ارسگنای سفلی ', '4508');
|
426 |
+
cities[149] = new Array('سلطان آباد ', '4509');
|
427 |
+
cities[150] = new Array('قله حسین خان ', '4510');
|
428 |
+
cities[151] = new Array('ذاکر کندی ', '4511');
|
429 |
+
cities[152] = new Array('قوچ احمد ', '4512');
|
430 |
+
cities[153] = new Array('اغزیارت ', '4513');
|
431 |
+
cities[154] = new Array('تیکمه داش', '5576');
|
432 |
+
break;
|
433 |
+
|
434 |
+
case 'خوزستان':
|
435 |
+
case 'khuzestan':
|
436 |
+
cities[1] = new Array('اهواز ', '3374');
|
437 |
+
cities[2] = new Array('آبادان ', '3538');
|
438 |
+
cities[3] = new Array('خرمشهر ', '3539');
|
439 |
+
cities[4] = new Array('اروندکنار ', '3075');
|
440 |
+
cities[5] = new Array('ملاثانی ', '3076');
|
441 |
+
cities[6] = new Array('ماهشهر ', '3077');
|
442 |
+
cities[7] = new Array('آغاجاری ', '3078');
|
443 |
+
cities[8] = new Array('رامهرمز ', '3079');
|
444 |
+
cities[9] = new Array('ایذه ', '3080');
|
445 |
+
cities[10] = new Array('شادگان ', '3081');
|
446 |
+
cities[11] = new Array('سوسنگرد ـ دشت آزادگان ', '3082');
|
447 |
+
cities[12] = new Array('شوشتر ', '3083');
|
448 |
+
cities[13] = new Array('دزفول ', '3084');
|
449 |
+
cities[14] = new Array('شوش ', '3085');
|
450 |
+
cities[15] = new Array('اندیمشک ', '3086');
|
451 |
+
cities[16] = new Array('مسجد سلیمان ', '3087');
|
452 |
+
cities[17] = new Array('شیبان ', '5597');
|
453 |
+
cities[18] = new Array('ویس ', '5598');
|
454 |
+
cities[19] = new Array('زهره ', '5599');
|
455 |
+
cities[20] = new Array('شرافت ', '5600');
|
456 |
+
cities[21] = new Array('سالند ', '5601');
|
457 |
+
cities[22] = new Array('فیاضی ', '4614');
|
458 |
+
cities[23] = new Array('تنگه یک ', '4615');
|
459 |
+
cities[24] = new Array('چویبده ', '4616');
|
460 |
+
cities[25] = new Array('نهر سلیم ', '4617');
|
461 |
+
cities[26] = new Array('فرخپیـسعدونی ', '4618');
|
462 |
+
cities[27] = new Array('ابطر ', '4619');
|
463 |
+
cities[28] = new Array('عیندو ', '4620');
|
464 |
+
cities[29] = new Array('حمیدیه ', '4621');
|
465 |
+
cities[30] = new Array('امالطیر ', '4622');
|
466 |
+
cities[31] = new Array('خزامی ', '4623');
|
467 |
+
cities[32] = new Array('قلعه چنعال ', '4624');
|
468 |
+
cities[33] = new Array('کریت برومی ', '4625');
|
469 |
+
cities[34] = new Array('نحیزانیه ', '4626');
|
470 |
+
cities[35] = new Array('چمکلگه ', '4627');
|
471 |
+
cities[36] = new Array('چمران ـ شهرک طالقانی ', '4628');
|
472 |
+
cities[37] = new Array('بندر امام خمینی ', '4629');
|
473 |
+
cities[38] = new Array('بندرامام خمینی ', '4630');
|
474 |
+
cities[39] = new Array('صالح شهر ', '4631');
|
475 |
+
cities[40] = new Array('اسیاب ', '4632');
|
476 |
+
cities[41] = new Array('هندیجان ', '4633');
|
477 |
+
cities[42] = new Array('بهبهان ', '4634');
|
478 |
+
cities[43] = new Array('گروه پدافندهوائی ', '4635');
|
479 |
+
cities[44] = new Array('ده ابراهیم ', '4636');
|
480 |
+
cities[45] = new Array('کردستان بزرگ ', '4637');
|
481 |
+
cities[46] = new Array('منصوریه ', '4638');
|
482 |
+
cities[47] = new Array('سردشت ', '4639');
|
483 |
+
cities[48] = new Array('امیدیه ', '4640');
|
484 |
+
cities[49] = new Array('میانکوه ', '4641');
|
485 |
+
cities[50] = new Array('رودزردماشین ', '4642');
|
486 |
+
cities[51] = new Array('کیم ', '4643');
|
487 |
+
cities[52] = new Array('نفت سفید ', '4644');
|
488 |
+
cities[53] = new Array('رمیله علیا ', '4645');
|
489 |
+
cities[54] = new Array('رامشیر ', '4646');
|
490 |
+
cities[55] = new Array('جایزان ', '4647');
|
491 |
+
cities[56] = new Array('دره تونمنمی ', '4648');
|
492 |
+
cities[57] = new Array('نورآباد ', '4649');
|
493 |
+
cities[58] = new Array('صیدون ', '4650');
|
494 |
+
cities[59] = new Array('باغ ملک ', '4651');
|
495 |
+
cities[60] = new Array('قلعه تل ', '4652');
|
496 |
+
cities[61] = new Array('چنارستان ', '4653');
|
497 |
+
cities[62] = new Array('پشت پیان ', '4654');
|
498 |
+
cities[63] = new Array('دهدز ', '4655');
|
499 |
+
cities[64] = new Array('عبودی ', '4656');
|
500 |
+
cities[65] = new Array('دارخوین ', '4657');
|
501 |
+
cities[66] = new Array('درویشی ', '4658');
|
502 |
+
cities[67] = new Array('بوزیسیف ', '4659');
|
503 |
+
cities[68] = new Array('مینوشهر ', '4660');
|
504 |
+
cities[69] = new Array('حفارشرقی ', '4661');
|
505 |
+
cities[70] = new Array('مقاومت ', '4662');
|
506 |
+
cities[71] = new Array('برویهیک ', '4663');
|
507 |
+
cities[72] = new Array('ابوحمیظه ', '4664');
|
508 |
+
cities[73] = new Array('هویزه ', '4665');
|
509 |
+
cities[74] = new Array('یزدنو ', '4666');
|
510 |
+
cities[75] = new Array('رفیع ', '4667');
|
511 |
+
cities[76] = new Array('بستان ', '4668');
|
512 |
+
cities[77] = new Array('سیدعباس ', '4669');
|
513 |
+
cities[78] = new Array('گوریه ', '4670');
|
514 |
+
cities[79] = new Array('جنتمکان ', '4671');
|
515 |
+
cities[80] = new Array('گتوند ', '4672');
|
516 |
+
cities[81] = new Array('پیردالو ', '4673');
|
517 |
+
cities[82] = new Array('شهرکنورمحمدی ', '4674');
|
518 |
+
cities[83] = new Array('گاومیش آباد ', '4675');
|
519 |
+
cities[84] = new Array('عربحسن ', '4676');
|
520 |
+
cities[85] = new Array('صفی آباد ', '4677');
|
521 |
+
cities[86] = new Array('شهرک امام خمینی ', '4678');
|
522 |
+
cities[87] = new Array('مهمانشهراصفهانی ', '4679');
|
523 |
+
cities[88] = new Array('بردگوری ', '4680');
|
524 |
+
cities[89] = new Array('نبات ', '4681');
|
525 |
+
cities[90] = new Array('چلون ', '4682');
|
526 |
+
cities[91] = new Array('شرکت کاغذسازی پار ', '4683');
|
527 |
+
cities[92] = new Array('مزرعه یک ', '4684');
|
528 |
+
cities[93] = new Array('خرج راضی احمد ', '4685');
|
529 |
+
cities[94] = new Array('الوانی ', '4686');
|
530 |
+
cities[95] = new Array('همله تیمور ', '4687');
|
531 |
+
cities[96] = new Array('شهرک بهرام ', '4688');
|
532 |
+
cities[97] = new Array('صالحمشطت ', '4689');
|
533 |
+
cities[98] = new Array('شهرک انصار ', '4690');
|
534 |
+
cities[99] = new Array('قلعه خواجو ', '4691');
|
535 |
+
cities[100] = new Array('حسینیه ', '4692');
|
536 |
+
cities[101] = new Array('کلگهدره2 ', '4693');
|
537 |
+
cities[102] = new Array('تلهزنگ ', '4694');
|
538 |
+
cities[103] = new Array('چمکلگ ', '4695');
|
539 |
+
cities[104] = new Array('عنبر ', '4696');
|
540 |
+
cities[105] = new Array('لالی ', '4697');
|
541 |
+
cities[106] = new Array('دره بوری ', '4698');
|
542 |
+
cities[107] = new Array('هفتگل ', '4699');
|
543 |
+
cities[108] = new Array('کوشکک کوشک ', '4700');
|
544 |
+
cities[109] = new Array('قلعه خواجه ـ اندیکا ', '4701');
|
545 |
+
cities[110] = new Array('گلگیر', '4702');
|
546 |
+
break;
|
547 |
+
|
548 |
+
case 'فارس':
|
549 |
+
case 'fars':
|
550 |
+
cities[1] = new Array('بهمن ', '5574');
|
551 |
+
cities[2] = new Array('بندامیر ', '4808');
|
552 |
+
cities[3] = new Array('اکبرآباد ', '4809');
|
553 |
+
cities[4] = new Array('خیرآبادتوللی ', '4810');
|
554 |
+
cities[5] = new Array('داریان ', '4811');
|
555 |
+
cities[6] = new Array('کچل آباد ', '4812');
|
556 |
+
cities[7] = new Array('گشنکان ', '4813');
|
557 |
+
cities[8] = new Array('کمجان ', '4814');
|
558 |
+
cities[9] = new Array('شورجه ', '4815');
|
559 |
+
cities[10] = new Array('مهارلونو ', '4816');
|
560 |
+
cities[11] = new Array('کوهنجان ', '4817');
|
561 |
+
cities[12] = new Array('سلطان آباد ', '4818');
|
562 |
+
cities[13] = new Array('تفیهان ', '4819');
|
563 |
+
cities[14] = new Array('طسوج ', '4820');
|
564 |
+
cities[15] = new Array('اکبرآبادکوار ', '4821');
|
565 |
+
cities[16] = new Array('مظفری ', '4822');
|
566 |
+
cities[17] = new Array('کوشک بیدک ', '4823');
|
567 |
+
cities[18] = new Array('فتح آباد ', '4824');
|
568 |
+
cities[19] = new Array('دهشیب ', '4825');
|
569 |
+
cities[20] = new Array('چنارراهدار ', '4826');
|
570 |
+
cities[21] = new Array('موردراز ', '4827');
|
571 |
+
cities[22] = new Array('کوشک بیبیچه ', '4828');
|
572 |
+
cities[23] = new Array('کلاتون ', '4829');
|
573 |
+
cities[24] = new Array('کلانی ', '4830');
|
574 |
+
cities[25] = new Array('کمارج ', '4831');
|
575 |
+
cities[26] = new Array('مهبودی علیا ', '4832');
|
576 |
+
cities[27] = new Array('وراوی ', '4833');
|
577 |
+
cities[28] = new Array('حکیم باشی ', '4834');
|
578 |
+
cities[29] = new Array('کنارتخته ', '4835');
|
579 |
+
cities[30] = new Array('خشت ', '4836');
|
580 |
+
cities[31] = new Array('انارستان ', '4837');
|
581 |
+
cities[32] = new Array('نودان ', '4838');
|
582 |
+
cities[33] = new Array('مهرنجان ', '4839');
|
583 |
+
cities[34] = new Array('جره ', '4840');
|
584 |
+
cities[35] = new Array('بالاده ', '4841');
|
585 |
+
cities[36] = new Array('لپوئی ', '4842');
|
586 |
+
cities[37] = new Array('کام فیروز ', '4843');
|
587 |
+
cities[38] = new Array('خرامه ', '4844');
|
588 |
+
cities[39] = new Array('سروستان ', '4845');
|
589 |
+
cities[40] = new Array('کوار ', '4846');
|
590 |
+
cities[41] = new Array('کدسنج ', '4847');
|
591 |
+
cities[42] = new Array('ماهسرم علیا ', '4848');
|
592 |
+
cities[43] = new Array('گویم ', '4849');
|
593 |
+
cities[44] = new Array('کلاه سیاه ', '4850');
|
594 |
+
cities[45] = new Array('بابامیر ', '4851');
|
595 |
+
cities[46] = new Array('آهنگری ', '4852');
|
596 |
+
cities[47] = new Array('پیرین ', '4853');
|
597 |
+
cities[48] = new Array('حسین آبادرستم ', '4854');
|
598 |
+
cities[49] = new Array('مصیری ـ رستم ', '4855');
|
599 |
+
cities[50] = new Array('میشان ', '4856');
|
600 |
+
cities[51] = new Array('بهرغان ', '4857');
|
601 |
+
cities[52] = new Array('بیضا ', '4858');
|
602 |
+
cities[53] = new Array('دهپاگا ', '4859');
|
603 |
+
cities[54] = new Array('کمهر ', '4860');
|
604 |
+
cities[55] = new Array('راشک علیا ', '4861');
|
605 |
+
cities[56] = new Array('هرایجان ', '4862');
|
606 |
+
cities[57] = new Array('بانش ', '4863');
|
607 |
+
cities[58] = new Array('کوشک ', '4864');
|
608 |
+
cities[59] = new Array('خانیمن ', '4865');
|
609 |
+
cities[60] = new Array('سعادت شهر ـ پاسارگاد ', '4866');
|
610 |
+
cities[61] = new Array('قادرآباد ', '4867');
|
611 |
+
cities[62] = new Array('ارسنجان ', '4868');
|
612 |
+
cities[63] = new Array('سیدان ', '4869');
|
613 |
+
cities[64] = new Array('زنگی آباد ', '4870');
|
614 |
+
cities[65] = new Array('کوشکک ', '4871');
|
615 |
+
cities[66] = new Array('خنجشت ', '4872');
|
616 |
+
cities[67] = new Array('امامزاده اسماعیل ', '4873');
|
617 |
+
cities[68] = new Array('حسن آباد ', '4874');
|
618 |
+
cities[69] = new Array('آس پاس ', '4875');
|
619 |
+
cities[70] = new Array('سده ', '4876');
|
620 |
+
cities[71] = new Array('بازیچه ', '4877');
|
621 |
+
cities[72] = new Array('دژکرد ', '4878');
|
622 |
+
cities[73] = new Array('شهرمیان ', '4879');
|
623 |
+
cities[74] = new Array('صغاد ', '4880');
|
624 |
+
cities[75] = new Array('بوانات ', '4881');
|
625 |
+
cities[76] = new Array('صفاشهر ـ خرم بید ', '4882');
|
626 |
+
cities[77] = new Array('خرمی ', '4883');
|
627 |
+
cities[78] = new Array('علاءمرودشت ', '4884');
|
628 |
+
cities[79] = new Array('فیشور ', '4885');
|
629 |
+
cities[80] = new Array('کازرون ', '3545');
|
630 |
+
cities[81] = new Array('جهرم ', '3546');
|
631 |
+
cities[82] = new Array('اردکان ـ سپیدان ', '3710');
|
632 |
+
cities[83] = new Array('مرودشت ', '3711');
|
633 |
+
cities[84] = new Array('اقلید ', '3712');
|
634 |
+
cities[85] = new Array('آباده ', '3713');
|
635 |
+
cities[86] = new Array('لار ـ لارستان ', '3714');
|
636 |
+
cities[87] = new Array('گراش ', '3715');
|
637 |
+
cities[88] = new Array('استهبان ', '3716');
|
638 |
+
cities[89] = new Array('فسا ', '3717');
|
639 |
+
cities[90] = new Array('فیروزآباد ', '3718');
|
640 |
+
cities[91] = new Array('داراب ', '3719');
|
641 |
+
cities[92] = new Array('نی ریز ', '3720');
|
642 |
+
cities[93] = new Array('شیراز ', '3384');
|
643 |
+
cities[94] = new Array('بوانات(سوریان) ', '3260');
|
644 |
+
cities[95] = new Array('سورمق ', '3261');
|
645 |
+
cities[96] = new Array('ایزدخواست ', '3262');
|
646 |
+
cities[97] = new Array('حیدرآباد ', '3263');
|
647 |
+
cities[98] = new Array('ابدون ', '3264');
|
648 |
+
cities[99] = new Array('باب انار ', '3265');
|
649 |
+
cities[100] = new Array('بندبست ', '3266');
|
650 |
+
cities[101] = new Array('آبگرم مینا ', '3267');
|
651 |
+
cities[102] = new Array('اوز ', '3268');
|
652 |
+
cities[103] = new Array('لامرد ', '3269');
|
653 |
+
cities[104] = new Array('جویم ', '3270');
|
654 |
+
cities[105] = new Array('بنارویه ', '3271');
|
655 |
+
cities[106] = new Array('لطیفی ', '3272');
|
656 |
+
cities[107] = new Array('بیرم ', '3273');
|
657 |
+
cities[108] = new Array('اشکنان ', '3274');
|
658 |
+
cities[109] = new Array('کهنه ', '3275');
|
659 |
+
cities[110] = new Array('خنج ', '3276');
|
660 |
+
cities[111] = new Array('مهر ', '3277');
|
661 |
+
cities[112] = new Array('رونیز ', '3278');
|
662 |
+
cities[113] = new Array('بنوان ', '3279');
|
663 |
+
cities[114] = new Array('ایج ', '3280');
|
664 |
+
cities[115] = new Array('درب قلعه ', '3281');
|
665 |
+
cities[116] = new Array('قلعه دمتنگ ', '3282');
|
666 |
+
cities[117] = new Array('قطب آباد ', '3283');
|
667 |
+
cities[118] = new Array('دنیان ', '3284');
|
668 |
+
cities[119] = new Array('سروو ', '3285');
|
669 |
+
cities[120] = new Array('مانیان ', '3286');
|
670 |
+
cities[121] = new Array('بهجان ', '3287');
|
671 |
+
cities[122] = new Array('کوشک قاضی ', '3288');
|
672 |
+
cities[123] = new Array('خیرآباد جنگل ', '3289');
|
673 |
+
cities[124] = new Array('نوبندگان ', '3290');
|
674 |
+
cities[125] = new Array('ششده ', '3291');
|
675 |
+
cities[126] = new Array('قاسم آباد سفلی ', '3292');
|
676 |
+
cities[127] = new Array('زاهدشهر ', '3293');
|
677 |
+
cities[128] = new Array('میانده ', '3294');
|
678 |
+
cities[129] = new Array('صحرارود ', '3295');
|
679 |
+
cities[130] = new Array('بایگان ', '3296');
|
680 |
+
cities[131] = new Array('مبارک آباد ', '3297');
|
681 |
+
cities[132] = new Array('میمند ', '3298');
|
682 |
+
cities[133] = new Array('افزر ', '3299');
|
683 |
+
cities[134] = new Array('قیر ', '3300');
|
684 |
+
cities[135] = new Array('فراشبند ', '3301');
|
685 |
+
cities[136] = new Array('دهرم ', '3302');
|
686 |
+
cities[137] = new Array('چوگان ', '3303');
|
687 |
+
cities[138] = new Array('مادوان ', '3304');
|
688 |
+
cities[139] = new Array('ماهسالاری ', '3305');
|
689 |
+
cities[140] = new Array('رستاق ', '3306');
|
690 |
+
cities[141] = new Array('دوبران ', '3307');
|
691 |
+
cities[142] = new Array('حاجی آباد ـ زرین دشت ', '3308');
|
692 |
+
cities[143] = new Array('فدامی ', '3309');
|
693 |
+
cities[144] = new Array('چمن مروارید ', '3310');
|
694 |
+
cities[145] = new Array('جنت شهر(دهخیر) ', '3311');
|
695 |
+
cities[146] = new Array('لای حنا ', '3312');
|
696 |
+
cities[147] = new Array('آباده طشک ', '3313');
|
697 |
+
cities[148] = new Array('قطاربنه ', '3314');
|
698 |
+
cities[149] = new Array('دهکرگی ', '3315');
|
699 |
+
cities[150] = new Array('جعفرآباد ', '3316');
|
700 |
+
cities[151] = new Array('مشکان ', '3317');
|
701 |
+
cities[152] = new Array('قطرویه ', '3318');
|
702 |
+
cities[153] = new Array('هرگان ', '3319');
|
703 |
+
cities[154] = new Array('خاوران ', '3320');
|
704 |
+
cities[155] = new Array('خفر ', '3321');
|
705 |
+
cities[156] = new Array('قائمیه ', '3123');
|
706 |
+
cities[157] = new Array('زرقان ', '3124');
|
707 |
+
cities[158] = new Array('نورآباد ـ ممسنی', '3125');
|
708 |
+
break;
|
709 |
+
|
710 |
+
case 'اصفهان':
|
711 |
+
case 'isfahan':
|
712 |
+
cities[1] = new Array('نوش آباد ', '5577');
|
713 |
+
cities[2] = new Array('بهارستان ', '5578');
|
714 |
+
cities[3] = new Array('نصر آباد ', '5579');
|
715 |
+
cities[4] = new Array('سگزی ', '5580');
|
716 |
+
cities[5] = new Array('تودشک ', '5581');
|
717 |
+
cities[6] = new Array('بادرود ', '5582');
|
718 |
+
cities[7] = new Array('خالدآباد ', '5583');
|
719 |
+
cities[8] = new Array('کوشک ', '5584');
|
720 |
+
cities[9] = new Array('نیاسر ', '5585');
|
721 |
+
cities[10] = new Array('ابریشم ', '5586');
|
722 |
+
cities[11] = new Array('افوس ', '5587');
|
723 |
+
cities[12] = new Array('رهنان ', '5575');
|
724 |
+
cities[13] = new Array('خوراسگان ', '5514');
|
725 |
+
cities[14] = new Array('دستجاء ', '5515');
|
726 |
+
cities[15] = new Array('شهرک صنعتی مورچ ', '5516');
|
727 |
+
cities[16] = new Array('پاسگاه امام جعفر ', '5517');
|
728 |
+
cities[17] = new Array('پالایشگاه اصفهان ', '5518');
|
729 |
+
cities[18] = new Array('کلهرود ', '5519');
|
730 |
+
cities[19] = new Array('گرگاب ', '5520');
|
731 |
+
cities[20] = new Array('دستگردوبرخوار ', '5521');
|
732 |
+
cities[21] = new Array('گز ', '5522');
|
733 |
+
cities[22] = new Array('خورزوق ', '5523');
|
734 |
+
cities[23] = new Array('حبیب آباد ', '5524');
|
735 |
+
cities[24] = new Array('موته ', '5525');
|
736 |
+
cities[25] = new Array('وزوان ', '5526');
|
737 |
+
cities[26] = new Array('لای بید ', '5527');
|
738 |
+
cities[27] = new Array('رباط آقاکمال ', '5528');
|
739 |
+
cities[28] = new Array('خسروآباد ', '5529');
|
740 |
+
cities[29] = new Array('کمشچه ', '5530');
|
741 |
+
cities[30] = new Array('جندق ', '5531');
|
742 |
+
cities[31] = new Array('فرخی ', '5532');
|
743 |
+
cities[32] = new Array('مزیک ', '5533');
|
744 |
+
cities[33] = new Array('مهرجان ', '5534');
|
745 |
+
cities[34] = new Array('بیاضیه ', '5535');
|
746 |
+
cities[35] = new Array('چوپانان ', '5536');
|
747 |
+
cities[36] = new Array('بلان ', '5537');
|
748 |
+
cities[37] = new Array('محمدآباد ', '5538');
|
749 |
+
cities[38] = new Array('هرند ', '5539');
|
750 |
+
cities[39] = new Array('ورزنه ', '5540');
|
751 |
+
cities[40] = new Array('قهجاورستان ', '5541');
|
752 |
+
cities[41] = new Array('نیک آباد ', '5542');
|
753 |
+
cities[42] = new Array('اژیه ', '5543');
|
754 |
+
cities[43] = new Array('حسن اباد ', '5544');
|
755 |
+
cities[44] = new Array('کچومثقال ', '5545');
|
756 |
+
cities[45] = new Array('ظفرقند ', '5546');
|
757 |
+
cities[46] = new Array('نهوج ', '5547');
|
758 |
+
cities[47] = new Array('نیسیان ', '5548');
|
759 |
+
cities[48] = new Array('ومکان ', '5549');
|
760 |
+
cities[49] = new Array('همسار ', '5550');
|
761 |
+
cities[50] = new Array('فسخود ', '5551');
|
762 |
+
cities[51] = new Array('نوداز ', '5552');
|
763 |
+
cities[52] = new Array('اشکستان ', '5553');
|
764 |
+
cities[53] = new Array('کجان ', '5554');
|
765 |
+
cities[54] = new Array('نیستانک ', '5555');
|
766 |
+
cities[55] = new Array('انارک ', '5556');
|
767 |
+
cities[56] = new Array('بافران ', '5557');
|
768 |
+
cities[57] = new Array('تیرانچی ', '5558');
|
769 |
+
cities[58] = new Array('اصغرآباد ', '5559');
|
770 |
+
cities[59] = new Array('دستگردفداره ', '5560');
|
771 |
+
cities[60] = new Array('قرطمان ', '5561');
|
772 |
+
cities[61] = new Array('جعفرآباد ', '5562');
|
773 |
+
cities[62] = new Array('مهاباد ', '5563');
|
774 |
+
cities[63] = new Array('درقه ', '5564');
|
775 |
+
cities[64] = new Array('شهراب ', '5565');
|
776 |
+
cities[65] = new Array('تورزن ', '5566');
|
777 |
+
cities[66] = new Array('کریم آباد ', '5567');
|
778 |
+
cities[67] = new Array('تلک آباد ', '5568');
|
779 |
+
cities[68] = new Array('موغار ', '5569');
|
780 |
+
cities[69] = new Array('خوانسارک ', '5570');
|
781 |
+
cities[70] = new Array('پیربکران ', '5571');
|
782 |
+
cities[71] = new Array('کلیشادوسودرجان ', '5572');
|
783 |
+
cities[72] = new Array('جوچی ', '5573');
|
784 |
+
cities[73] = new Array('کرمگان ', '5086');
|
785 |
+
cities[74] = new Array('باغکومه ', '5087');
|
786 |
+
cities[75] = new Array('سهروفیروزان ', '5088');
|
787 |
+
cities[76] = new Array('لارگان ', '5089');
|
788 |
+
cities[77] = new Array('اشترجان ', '5090');
|
789 |
+
cities[78] = new Array('گارماسه ', '5091');
|
790 |
+
cities[79] = new Array('حسین آبادازران ', '5092');
|
791 |
+
cities[80] = new Array('شیردوان ', '5093');
|
792 |
+
cities[81] = new Array('جوجیل ', '5094');
|
793 |
+
cities[82] = new Array('ورنامخواست ', '5095');
|
794 |
+
cities[83] = new Array('سده لنجان ', '5096');
|
795 |
+
cities[84] = new Array('چرمهین ', '5097');
|
796 |
+
cities[85] = new Array('باغ بهارداران ', '5098');
|
797 |
+
cities[86] = new Array('نوگوران ', '5099');
|
798 |
+
cities[87] = new Array('چمگردان ', '5100');
|
799 |
+
cities[88] = new Array('کرجگان ', '5101');
|
800 |
+
cities[89] = new Array('دیزیچه ', '5102');
|
801 |
+
cities[90] = new Array('زیبا شهر ', '5103');
|
802 |
+
cities[91] = new Array('باغملک ', '5104');
|
803 |
+
cities[92] = new Array('دهسرخ ', '5105');
|
804 |
+
cities[93] = new Array('پلی اکریل ', '5106');
|
805 |
+
cities[94] = new Array('فولادمبارکه ', '5107');
|
806 |
+
cities[95] = new Array('کرکوند ', '5108');
|
807 |
+
cities[96] = new Array('زاینده رود ', '5109');
|
808 |
+
cities[97] = new Array('چمنور ', '5110');
|
809 |
+
cities[98] = new Array('کجرثیه ', '5111');
|
810 |
+
cities[99] = new Array('اشیان ', '5112');
|
811 |
+
cities[100] = new Array('طالخونچه ', '5113');
|
812 |
+
cities[101] = new Array('نکوآباد ', '5114');
|
813 |
+
cities[102] = new Array('رضوان شهر ', '5115');
|
814 |
+
cities[103] = new Array('ورپشت ', '5116');
|
815 |
+
cities[104] = new Array('عسگران ', '5117');
|
816 |
+
cities[105] = new Array('گندان ', '5118');
|
817 |
+
cities[106] = new Array('عزیزآباد ', '5119');
|
818 |
+
cities[107] = new Array('میرآباد ', '5120');
|
819 |
+
cities[108] = new Array('حاجی آباد ', '5121');
|
820 |
+
cities[109] = new Array('خیرآباد ', '5122');
|
821 |
+
cities[110] = new Array('اشن ', '5123');
|
822 |
+
cities[111] = new Array('خونداب ', '5124');
|
823 |
+
cities[112] = new Array('حسین آباد ', '5125');
|
824 |
+
cities[113] = new Array('غرغن ', '5126');
|
825 |
+
cities[114] = new Array('دامنه ', '5127');
|
826 |
+
cities[115] = new Array('بوئین ومیاندشت ', '5128');
|
827 |
+
cities[116] = new Array('زرنه ', '5129');
|
828 |
+
cities[117] = new Array('بلطاق ', '5130');
|
829 |
+
cities[118] = new Array('کرچ ', '5131');
|
830 |
+
cities[119] = new Array('قره بلطاق ', '5132');
|
831 |
+
cities[120] = new Array('مجتمع مسکونی سدزا ', '5133');
|
832 |
+
cities[121] = new Array('مشهد کاوه ', '5134');
|
833 |
+
cities[122] = new Array('اسکندری برآفتاب ', '5135');
|
834 |
+
cities[123] = new Array('رزوه ', '5136');
|
835 |
+
cities[124] = new Array('نهرخلج ', '5137');
|
836 |
+
cities[125] = new Array('چاه غلامرضارحیمی ', '5138');
|
837 |
+
cities[126] = new Array('اورگان ', '5139');
|
838 |
+
cities[127] = new Array('گلدشت ', '5140');
|
839 |
+
cities[128] = new Array('جوزدان ', '5141');
|
840 |
+
cities[129] = new Array('کهریزسنگ ', '5142');
|
841 |
+
cities[130] = new Array('نهضت آباد ', '5143');
|
842 |
+
cities[131] = new Array('قلعسرخ ', '5144');
|
843 |
+
cities[132] = new Array('اسلام ابادموگوئی ', '5145');
|
844 |
+
cities[133] = new Array('مصیر ', '5146');
|
845 |
+
cities[134] = new Array('برف انبار ', '5147');
|
846 |
+
cities[135] = new Array('قمشلو ', '5148');
|
847 |
+
cities[136] = new Array('قمبوان ', '5149');
|
848 |
+
cities[137] = new Array('مهیار ', '5150');
|
849 |
+
cities[138] = new Array('پیرزان ', '5151');
|
850 |
+
cities[139] = new Array('منوچهرآباد ', '5152');
|
851 |
+
cities[140] = new Array('شهرک شیمیائی رازی ', '5153');
|
852 |
+
cities[141] = new Array('همگین ', '5154');
|
853 |
+
cities[142] = new Array('موسی آباد ', '5155');
|
854 |
+
cities[143] = new Array('کهرویه ', '5156');
|
855 |
+
cities[144] = new Array('قصرچم ', '5157');
|
856 |
+
cities[145] = new Array('اسلام آباد ', '5158');
|
857 |
+
cities[146] = new Array('امین آباد ', '5159');
|
858 |
+
cities[147] = new Array('مقصودبیک ', '5160');
|
859 |
+
cities[148] = new Array('سولار ', '5161');
|
860 |
+
cities[149] = new Array('منظریه ', '5162');
|
861 |
+
cities[150] = new Array('گرموک ', '5163');
|
862 |
+
cities[151] = new Array('مزرعه بانه ', '5164');
|
863 |
+
cities[152] = new Array('هست ', '5165');
|
864 |
+
cities[153] = new Array('ونک ', '5166');
|
865 |
+
cities[154] = new Array('قبرکیفا ', '5167');
|
866 |
+
cities[155] = new Array('کهنگان ', '5168');
|
867 |
+
cities[156] = new Array('کمه ', '5169');
|
868 |
+
cities[157] = new Array('مورک ', '5170');
|
869 |
+
cities[158] = new Array('چهارراه ', '5171');
|
870 |
+
cities[159] = new Array('دهنساء سفلی ', '5172');
|
871 |
+
cities[160] = new Array('اغداش ', '5173');
|
872 |
+
cities[161] = new Array('چشمه رحمان ', '5174');
|
873 |
+
cities[162] = new Array('ورق ', '5175');
|
874 |
+
cities[163] = new Array('سعادت آباد ', '5176');
|
875 |
+
cities[164] = new Array('فتح آباد ', '5177');
|
876 |
+
cities[165] = new Array('سنسن ', '5178');
|
877 |
+
cities[166] = new Array('کامو ', '5179');
|
878 |
+
cities[167] = new Array('دهریز ', '5180');
|
879 |
+
cities[168] = new Array('رجق ', '5181');
|
880 |
+
cities[169] = new Array('ابشیرین ', '5182');
|
881 |
+
cities[170] = new Array('نشلج ', '5183');
|
882 |
+
cities[171] = new Array('مشکات ', '5184');
|
883 |
+
cities[172] = new Array('سفید شهر ', '5185');
|
884 |
+
cities[173] = new Array('مزرعه صدر ', '5186');
|
885 |
+
cities[174] = new Array('ابوزیدآباد ', '5187');
|
886 |
+
cities[175] = new Array('کاغذی ', '5188');
|
887 |
+
cities[176] = new Array('قهرود ', '5189');
|
888 |
+
cities[177] = new Array('جوشقان و کامو ', '5190');
|
889 |
+
cities[178] = new Array('برزک ', '5191');
|
890 |
+
cities[179] = new Array('اسحق آباد ', '5192');
|
891 |
+
cities[180] = new Array('وادقان ', '5193');
|
892 |
+
cities[181] = new Array('اذران ', '5194');
|
893 |
+
cities[182] = new Array('طرق ', '5195');
|
894 |
+
cities[183] = new Array('اریسمان ', '5196');
|
895 |
+
cities[184] = new Array('ابیانه ', '5197');
|
896 |
+
cities[185] = new Array('اوره ', '5198');
|
897 |
+
cities[186] = new Array('کامه ', '5199');
|
898 |
+
cities[187] = new Array('ملازجان ', '5200');
|
899 |
+
cities[188] = new Array('سعیدآباد ', '5201');
|
900 |
+
cities[189] = new Array('مرغ ', '5202');
|
901 |
+
cities[190] = new Array('قرغن ', '5203');
|
902 |
+
cities[191] = new Array('کوچری ', '5204');
|
903 |
+
cities[192] = new Array('کلوچان ', '5205');
|
904 |
+
cities[193] = new Array('گلشهر ', '5206');
|
905 |
+
cities[194] = new Array('وداغ ', '5207');
|
906 |
+
cities[195] = new Array('زرنجان ', '5208');
|
907 |
+
cities[196] = new Array('وانشان ', '5209');
|
908 |
+
cities[197] = new Array('تیکن ', '5210');
|
909 |
+
cities[198] = new Array('سنگ سفید ', '5211');
|
910 |
+
cities[199] = new Array('رحمت آباد ', '5212');
|
911 |
+
cities[200] = new Array('خمپیچ ', '5213');
|
912 |
+
cities[201] = new Array('مهرآباد ', '5214');
|
913 |
+
cities[202] = new Array('تیدجان ', '5215');
|
914 |
+
cities[203] = new Array('خشک رود ', '5216');
|
915 |
+
cities[204] = new Array('ویست ', '5217');
|
916 |
+
cities[205] = new Array('سپاهان شهر ', '5218');
|
917 |
+
cities[206] = new Array('شاهین شهر ', '3552');
|
918 |
+
cities[207] = new Array('خمینی شهر ', '3553');
|
919 |
+
cities[208] = new Array('نجف آباد ', '3554');
|
920 |
+
cities[209] = new Array('شهرضا ', '3555');
|
921 |
+
cities[210] = new Array('کاشان ', '3556');
|
922 |
+
cities[211] = new Array('مورچه خورت ', '3761');
|
923 |
+
cities[212] = new Array('دولت آباد ', '3762');
|
924 |
+
cities[213] = new Array('میمه ', '3763');
|
925 |
+
cities[214] = new Array('خور ', '3764');
|
926 |
+
cities[215] = new Array('کوهپایه ', '3765');
|
927 |
+
cities[216] = new Array('اردستان ', '3766');
|
928 |
+
cities[217] = new Array('نائین ', '3767');
|
929 |
+
cities[218] = new Array('درچه ', '3768');
|
930 |
+
cities[219] = new Array('زواره ', '3769');
|
931 |
+
cities[220] = new Array('فلاورجان ', '3770');
|
932 |
+
cities[221] = new Array('قهد ریجان ', '3771');
|
933 |
+
cities[222] = new Array('زرین شهر ـ لنجان ', '3772');
|
934 |
+
cities[223] = new Array('مبارکه ', '3773');
|
935 |
+
cities[224] = new Array('فولادشهر ', '3774');
|
936 |
+
cities[225] = new Array('تیران ', '3775');
|
937 |
+
cities[226] = new Array('دهق ', '3776');
|
938 |
+
cities[227] = new Array('علویچه ', '3777');
|
939 |
+
cities[228] = new Array('داران ـ فریدن ', '3778');
|
940 |
+
cities[229] = new Array('چادگان ', '3779');
|
941 |
+
cities[230] = new Array('ویلاشهر ', '3780');
|
942 |
+
cities[231] = new Array('فریدون شهر ', '3781');
|
943 |
+
cities[232] = new Array('اصفهان ', '3386');
|
944 |
+
cities[233] = new Array('شهرک مجلسی ', '2983');
|
945 |
+
cities[234] = new Array('دهاقان ', '2984');
|
946 |
+
cities[235] = new Array('اسفرجان ', '2985');
|
947 |
+
cities[236] = new Array('سمیرم ', '2986');
|
948 |
+
cities[237] = new Array('حنا ', '2987');
|
949 |
+
cities[238] = new Array('مهرگرد ', '2988');
|
950 |
+
cities[239] = new Array('جوشقان استرک ', '2989');
|
951 |
+
cities[240] = new Array('آران وبیدگل ', '2990');
|
952 |
+
cities[241] = new Array('قمصر ', '2991');
|
953 |
+
cities[242] = new Array('نطنز ', '2992');
|
954 |
+
cities[243] = new Array('گلپایگان ', '2993');
|
955 |
+
cities[244] = new Array('گوگد ', '2994');
|
956 |
+
cities[245] = new Array('خوانسار', '2995');
|
957 |
+
break;
|
958 |
+
|
959 |
+
case 'خراسان رضوی':
|
960 |
+
case 'khorasan - razavi':
|
961 |
+
case 'khorasan-razavi':
|
962 |
+
cities[1] = new Array('گیفان بالا ', '2832');
|
963 |
+
cities[2] = new Array('دررود ', '3013');
|
964 |
+
cities[3] = new Array('طرقبه ـ بینالود ', '3018');
|
965 |
+
cities[4] = new Array('چناران ', '3019');
|
966 |
+
cities[5] = new Array('کلات ', '3020');
|
967 |
+
cities[6] = new Array('سرخس ', '3021');
|
968 |
+
cities[7] = new Array('فریمان ', '3022');
|
969 |
+
cities[8] = new Array('مشهد ', '3387');
|
970 |
+
cities[9] = new Array('قزاقی ', '2893');
|
971 |
+
cities[10] = new Array('بام ', '2894');
|
972 |
+
cities[11] = new Array('راهچمن ', '2881');
|
973 |
+
cities[12] = new Array('انداده ', '2882');
|
974 |
+
cities[13] = new Array('نقاب ـ جوین ', '2883');
|
975 |
+
cities[14] = new Array('حکم اباد ', '2884');
|
976 |
+
cities[15] = new Array('برغمد ', '2885');
|
977 |
+
cities[16] = new Array('بلاش اباد ', '2886');
|
978 |
+
cities[17] = new Array('نوده انقلاب ', '2887');
|
979 |
+
cities[18] = new Array('رباط جز ', '2888');
|
980 |
+
cities[19] = new Array('شامکان ', '2889');
|
981 |
+
cities[20] = new Array('تندک ', '2890');
|
982 |
+
cities[21] = new Array('شقان ', '3024');
|
983 |
+
cities[22] = new Array('قوچان ', '3025');
|
984 |
+
cities[23] = new Array('درگز ', '3026');
|
985 |
+
cities[24] = new Array('فیض آباد ـ مه ولات ', '3027');
|
986 |
+
cities[25] = new Array('رشتخوار ', '3028');
|
987 |
+
cities[26] = new Array('کدکن ', '3029');
|
988 |
+
cities[27] = new Array('خواف ', '3030');
|
989 |
+
cities[28] = new Array('تربت جام ', '3031');
|
990 |
+
cities[29] = new Array('صالح آباد ', '3032');
|
991 |
+
cities[30] = new Array('تایباد ', '3033');
|
992 |
+
cities[31] = new Array('داورزن ', '3034');
|
993 |
+
cities[32] = new Array('جغتای ', '3035');
|
994 |
+
cities[33] = new Array('ششتمد ', '3036');
|
995 |
+
cities[34] = new Array('کاشمر ', '3037');
|
996 |
+
cities[35] = new Array('بردسکن ', '3038');
|
997 |
+
cities[36] = new Array('گناباد ', '3039');
|
998 |
+
cities[37] = new Array('خرم ده غربی ', '2825');
|
999 |
+
cities[38] = new Array('امیرآباد ', '2827');
|
1000 |
+
cities[39] = new Array('گریوان ', '2828');
|
1001 |
+
cities[40] = new Array('بدرانلو ', '2829');
|
1002 |
+
cities[41] = new Array('اینچه علیا ', '2816');
|
1003 |
+
cities[42] = new Array('امند ', '2817');
|
1004 |
+
cities[43] = new Array('کهنه جلگه ', '2818');
|
1005 |
+
cities[44] = new Array('یکه سعودعلیا ', '2819');
|
1006 |
+
cities[45] = new Array('راستقان ', '2820');
|
1007 |
+
cities[46] = new Array('غلامان ', '2821');
|
1008 |
+
cities[47] = new Array('اصغرآباد ', '2822');
|
1009 |
+
cities[48] = new Array('چمنبید ', '2823');
|
1010 |
+
cities[49] = new Array('قاسمخان ', '2896');
|
1011 |
+
cities[50] = new Array('رزق اباد ', '2897');
|
1012 |
+
cities[51] = new Array('سارمران ', '2898');
|
1013 |
+
cities[52] = new Array('روئین ', '2899');
|
1014 |
+
cities[53] = new Array('اوندر ', '2900');
|
1015 |
+
cities[54] = new Array('ریوش(کوهسرخ) ', '2901');
|
1016 |
+
cities[55] = new Array('دهنو ', '2902');
|
1017 |
+
cities[56] = new Array('فدافند ', '2903');
|
1018 |
+
cities[57] = new Array('خلیل آباد ', '2904');
|
1019 |
+
cities[58] = new Array('کندر ', '2905');
|
1020 |
+
cities[59] = new Array('بند قرائ ', '2906');
|
1021 |
+
cities[60] = new Array('کاسف ', '2907');
|
1022 |
+
cities[61] = new Array('کبودان ', '2908');
|
1023 |
+
cities[62] = new Array('شفیع اباد ', '2909');
|
1024 |
+
cities[63] = new Array('رکناباد ', '2910');
|
1025 |
+
cities[64] = new Array('شهرآباد ', '2911');
|
1026 |
+
cities[65] = new Array('انابد ', '2912');
|
1027 |
+
cities[66] = new Array('میرآباد مازول ', '2774');
|
1028 |
+
cities[67] = new Array('فرخک ', '2775');
|
1029 |
+
cities[68] = new Array('خرو ', '2776');
|
1030 |
+
cities[69] = new Array('قدمگاه ', '2777');
|
1031 |
+
cities[70] = new Array('اسحاق آباد ', '2778');
|
1032 |
+
cities[71] = new Array('خوجان ', '2779');
|
1033 |
+
cities[72] = new Array('عشق آباد ', '2780');
|
1034 |
+
cities[73] = new Array('اوارشک ', '2781');
|
1035 |
+
cities[74] = new Array('ملک آباد ', '2782');
|
1036 |
+
cities[75] = new Array('گورده ', '2783');
|
1037 |
+
cities[76] = new Array('شاندیز ', '2784');
|
1038 |
+
cities[77] = new Array('طوس سفلی ', '2785');
|
1039 |
+
cities[78] = new Array('قرقی سفلی ', '2786');
|
1040 |
+
cities[79] = new Array('کنویست ', '2787');
|
1041 |
+
cities[80] = new Array('رادکان ', '2788');
|
1042 |
+
cities[81] = new Array('سیدآباد ', '2789');
|
1043 |
+
cities[82] = new Array('گلبهار ', '2790');
|
1044 |
+
cities[83] = new Array('سلوگرد ', '2791');
|
1045 |
+
cities[84] = new Array('ارداک ', '2792');
|
1046 |
+
cities[85] = new Array('بقمچ ', '2793');
|
1047 |
+
cities[86] = new Array('گلمکان ', '2794');
|
1048 |
+
cities[87] = new Array('شهرک رضوی ', '2795');
|
1049 |
+
cities[88] = new Array('میامی ', '2796');
|
1050 |
+
cities[89] = new Array('چاهک ', '2797');
|
1051 |
+
cities[90] = new Array('شهر زو ', '2798');
|
1052 |
+
cities[91] = new Array('گوش ', '2799');
|
1053 |
+
cities[92] = new Array('نریمانی سفلی ', '2800');
|
1054 |
+
cities[93] = new Array('تقی آباد ', '2801');
|
1055 |
+
cities[94] = new Array('کچولی ', '2802');
|
1056 |
+
cities[95] = new Array('شیرتپه ', '2803');
|
1057 |
+
cities[96] = new Array('پس کمر ', '2804');
|
1058 |
+
cities[97] = new Array('مزداوند ', '2805');
|
1059 |
+
cities[98] = new Array('بزنگان ', '2806');
|
1060 |
+
cities[99] = new Array('گنبدلی ', '2807');
|
1061 |
+
cities[100] = new Array('کندکلی ', '2808');
|
1062 |
+
cities[101] = new Array('کته شمشیرسفلی ', '2809');
|
1063 |
+
cities[102] = new Array('سنگبست ', '2810');
|
1064 |
+
cities[103] = new Array('سفید سنگ ', '2811');
|
1065 |
+
cities[104] = new Array('قلندرآباد ', '2812');
|
1066 |
+
cities[105] = new Array('فرهادگرد ', '2813');
|
1067 |
+
cities[106] = new Array('زرکک ', '2814');
|
1068 |
+
cities[107] = new Array('کهنه اوغاز ', '2835');
|
1069 |
+
cities[108] = new Array('دوین ', '2836');
|
1070 |
+
cities[109] = new Array('گلیان ', '2837');
|
1071 |
+
cities[110] = new Array('زاورم ', '2838');
|
1072 |
+
cities[111] = new Array('زیارت ', '2839');
|
1073 |
+
cities[112] = new Array('رباط ', '2840');
|
1074 |
+
cities[113] = new Array('شهرکهنه ', '2841');
|
1075 |
+
cities[114] = new Array('قریه شرف ', '2842');
|
1076 |
+
cities[115] = new Array('نشتیفان ', '2843');
|
1077 |
+
cities[116] = new Array('سنگان ', '2844');
|
1078 |
+
cities[117] = new Array('مزن آباد ', '2845');
|
1079 |
+
cities[118] = new Array('قاسم آباد ', '2846');
|
1080 |
+
cities[119] = new Array('چمن آباد ', '2847');
|
1081 |
+
cities[120] = new Array('حسن آباد ', '2848');
|
1082 |
+
cities[121] = new Array('سلامی ', '2849');
|
1083 |
+
cities[122] = new Array('چشمه گل ', '2850');
|
1084 |
+
cities[123] = new Array('سمیع آباد ', '2851');
|
1085 |
+
cities[124] = new Array('نیل شهر ', '2852');
|
1086 |
+
cities[125] = new Array('احمدآباد صولت ', '2853');
|
1087 |
+
cities[126] = new Array('نصرآباد ', '2854');
|
1088 |
+
cities[127] = new Array('ابدال آباد ', '2855');
|
1089 |
+
cities[128] = new Array('کاریزنو ', '2856');
|
1090 |
+
cities[129] = new Array('درزاب علیا ', '2857');
|
1091 |
+
cities[130] = new Array('محموداباد ', '2858');
|
1092 |
+
cities[131] = new Array('یاقوتین جدید ', '2859');
|
1093 |
+
cities[132] = new Array('جنت اباد ', '2860');
|
1094 |
+
cities[133] = new Array('موسی اباد ', '2861');
|
1095 |
+
cities[134] = new Array('نبی تاک ', '2862');
|
1096 |
+
cities[135] = new Array('ازاده ', '2863');
|
1097 |
+
cities[136] = new Array('کاریز ', '2864');
|
1098 |
+
cities[137] = new Array('درفارون ', '2865');
|
1099 |
+
cities[138] = new Array('کرات ', '2866');
|
1100 |
+
cities[139] = new Array('مشهدریزه ', '2867');
|
1101 |
+
cities[140] = new Array('باخرز ', '2868');
|
1102 |
+
cities[141] = new Array('قلعه نو ', '2869');
|
1103 |
+
cities[142] = new Array('کوهسفید ', '2870');
|
1104 |
+
cities[143] = new Array('مهر ', '2871');
|
1105 |
+
cities[144] = new Array('رباط سرپوش ', '2872');
|
1106 |
+
cities[145] = new Array('مشکان ', '2873');
|
1107 |
+
cities[146] = new Array('نامن ', '2874');
|
1108 |
+
cities[147] = new Array('رودآب ', '2875');
|
1109 |
+
cities[148] = new Array('بنفج ', '2876');
|
1110 |
+
cities[149] = new Array('مزینان ', '2877');
|
1111 |
+
cities[150] = new Array('دستوران ', '2878');
|
1112 |
+
cities[151] = new Array('ازادوار ', '2879');
|
1113 |
+
cities[152] = new Array('نیشابور ', '3559');
|
1114 |
+
cities[153] = new Array('تربت حیدریه ', '3561');
|
1115 |
+
cities[154] = new Array('سبزوار ', '3562');
|
1116 |
+
cities[155] = new Array('چرمه ', '5395');
|
1117 |
+
cities[156] = new Array('ارسک ', '5396');
|
1118 |
+
cities[157] = new Array('رقه ', '5397');
|
1119 |
+
cities[158] = new Array('کرند ', '5398');
|
1120 |
+
cities[159] = new Array('اصفاک ', '5399');
|
1121 |
+
cities[160] = new Array('نیگان ', '5400');
|
1122 |
+
cities[161] = new Array('خانکوک ', '5401');
|
1123 |
+
cities[162] = new Array('شاهرخت ', '5390');
|
1124 |
+
cities[163] = new Array('دهک ', '5384');
|
1125 |
+
cities[164] = new Array('میغان ', '5385');
|
1126 |
+
cities[165] = new Array('طبین بالا ', '5386');
|
1127 |
+
cities[166] = new Array('بیهود ', '5387');
|
1128 |
+
cities[167] = new Array('افریر ', '5388');
|
1129 |
+
cities[168] = new Array('گزیک ', '5377');
|
1130 |
+
cities[169] = new Array('شاخن ', '5378');
|
1131 |
+
cities[170] = new Array('گازار ', '5379');
|
1132 |
+
cities[171] = new Array('چاهداشی ', '5380');
|
1133 |
+
cities[172] = new Array('چهار فرسخ ', '5381');
|
1134 |
+
cities[173] = new Array('توتسک ', '5382');
|
1135 |
+
cities[174] = new Array('چهکند ', '5368');
|
1136 |
+
cities[175] = new Array('القور ', '5369');
|
1137 |
+
cities[176] = new Array('درح ', '5370');
|
1138 |
+
cities[177] = new Array('القار ', '5371');
|
1139 |
+
cities[178] = new Array('طبس سینا ', '5372');
|
1140 |
+
cities[179] = new Array('برون ', '5392');
|
1141 |
+
cities[180] = new Array('مصعبی ', '5393');
|
1142 |
+
cities[181] = new Array('سلطان آباد ', '5594');
|
1143 |
+
cities[182] = new Array('رضویه ', '5595');
|
1144 |
+
cities[183] = new Array('همت آباد ', '5596');
|
1145 |
+
cities[184] = new Array('دیهوک ', '5403');
|
1146 |
+
cities[185] = new Array('کریت ', '5404');
|
1147 |
+
cities[186] = new Array('اسفندیار ', '5405');
|
1148 |
+
cities[187] = new Array('جوخواه ', '5406');
|
1149 |
+
cities[188] = new Array('پیرحاجات ', '5407');
|
1150 |
+
cities[189] = new Array('گزو ', '5408');
|
1151 |
+
cities[190] = new Array('سربیت ', '5409');
|
1152 |
+
cities[191] = new Array('مرزداران ', '5410');
|
1153 |
+
cities[192] = new Array('فیروزه ـ تخت جلگه ', '5411');
|
1154 |
+
cities[193] = new Array('شوراب ', '5312');
|
1155 |
+
cities[194] = new Array('گلبوی سفلی ', '5313');
|
1156 |
+
cities[195] = new Array('مبارکه ', '5314');
|
1157 |
+
cities[196] = new Array('چکنه ', '5315');
|
1158 |
+
cities[197] = new Array('برزنون ', '5316');
|
1159 |
+
cities[198] = new Array('فدیشه ', '5317');
|
1160 |
+
cities[199] = new Array('بار ', '5318');
|
1161 |
+
cities[200] = new Array('یلاک ', '5319');
|
1162 |
+
cities[201] = new Array('دیزادیز ', '5320');
|
1163 |
+
cities[202] = new Array('جعفرآبادعلیا ', '5321');
|
1164 |
+
cities[203] = new Array('شفیع ', '5322');
|
1165 |
+
cities[204] = new Array('دوغایی ', '5323');
|
1166 |
+
cities[205] = new Array('تیکانلو ', '5325');
|
1167 |
+
cities[206] = new Array('جوزان ', '5326');
|
1168 |
+
cities[207] = new Array('امام قلی ', '5327');
|
1169 |
+
cities[208] = new Array('باجگیران ', '5328');
|
1170 |
+
cities[209] = new Array('مایوان ', '5329');
|
1171 |
+
cities[210] = new Array('چریرسالت ', '5330');
|
1172 |
+
cities[211] = new Array('خرق ', '5331');
|
1173 |
+
cities[212] = new Array('حسن آبادلائن نو ', '5332');
|
1174 |
+
cities[213] = new Array('لطف آباد ', '5333');
|
1175 |
+
cities[214] = new Array('کبکان ', '5334');
|
1176 |
+
cities[215] = new Array('چاپشلو ', '5335');
|
1177 |
+
cities[216] = new Array('نوخندان ', '5336');
|
1178 |
+
cities[217] = new Array('زیندانلو ', '5337');
|
1179 |
+
cities[218] = new Array('محمدتقی ', '5338');
|
1180 |
+
cities[219] = new Array('سیوکی ', '5339');
|
1181 |
+
cities[220] = new Array('مهنه ', '5340');
|
1182 |
+
cities[221] = new Array('عبدل آباد ', '5341');
|
1183 |
+
cities[222] = new Array('شادمهر ', '5342');
|
1184 |
+
cities[223] = new Array('بایک ', '5344');
|
1185 |
+
cities[224] = new Array('چخماق ', '5345');
|
1186 |
+
cities[225] = new Array('قلعه آقاحسن ', '5346');
|
1187 |
+
cities[226] = new Array('زرغری ', '5347');
|
1188 |
+
cities[227] = new Array('جنگل ', '5348');
|
1189 |
+
cities[228] = new Array('باسفر ', '5349');
|
1190 |
+
cities[229] = new Array('دولت آباد ـ زاوه ', '5350');
|
1191 |
+
cities[230] = new Array('یک لنگی علیا ', '5351');
|
1192 |
+
cities[231] = new Array('کامه سفلی ', '5352');
|
1193 |
+
cities[232] = new Array('رودخانه ', '5353');
|
1194 |
+
cities[233] = new Array('رباط سنگ ', '5354');
|
1195 |
+
cities[234] = new Array('اسدآباد ', '5355');
|
1196 |
+
cities[235] = new Array('نسر ', '5356');
|
1197 |
+
cities[236] = new Array('درونه ', '5357');
|
1198 |
+
cities[237] = new Array('یونسی ', '5358');
|
1199 |
+
cities[238] = new Array('بیدخت ', '5359');
|
1200 |
+
cities[239] = new Array('گیسوبالا ', '5360');
|
1201 |
+
cities[240] = new Array('کاخک ', '5361');
|
1202 |
+
cities[241] = new Array('زیبد ', '5362');
|
1203 |
+
cities[242] = new Array('بجستان ', '5363');
|
1204 |
+
cities[243] = new Array('جزین ', '5364');
|
1205 |
+
cities[244] = new Array('ماژان ', '5365');
|
1206 |
+
cities[245] = new Array('روبیات', '5366');
|
1207 |
+
break;
|
1208 |
+
|
1209 |
+
case 'قزوین':
|
1210 |
+
case 'qazvin':
|
1211 |
+
cities[1] = new Array('قزوین ', '3512');
|
1212 |
+
cities[2] = new Array('شهر صنعتی البرز ', '3595');
|
1213 |
+
cities[3] = new Array('اقبالیه ', '3596');
|
1214 |
+
cities[4] = new Array('الوند ـ البرز ', '3597');
|
1215 |
+
cities[5] = new Array('آبیک ', '3598');
|
1216 |
+
cities[6] = new Array('بوئین زهرا ', '3599');
|
1217 |
+
cities[7] = new Array('َآوج ', '3600');
|
1218 |
+
cities[8] = new Array('طالقان ', '3601');
|
1219 |
+
cities[9] = new Array('تاکستان ', '3602');
|
1220 |
+
cities[10] = new Array('محمدیه ', '3603');
|
1221 |
+
cities[11] = new Array('محمود آباد نمونه ', '3876');
|
1222 |
+
cities[12] = new Array('بیدستان ', '3877');
|
1223 |
+
cities[13] = new Array('الولک ', '3878');
|
1224 |
+
cities[14] = new Array('کاکوهستان ', '3879');
|
1225 |
+
cities[15] = new Array('فلار ', '3880');
|
1226 |
+
cities[16] = new Array('رجائی دشت ', '3881');
|
1227 |
+
cities[17] = new Array('معلم کلایه ', '3882');
|
1228 |
+
cities[18] = new Array('مینودشت ', '3883');
|
1229 |
+
cities[19] = new Array('زوارک ', '3884');
|
1230 |
+
cities[20] = new Array('صمغ آباد ', '3885');
|
1231 |
+
cities[21] = new Array('ناصرآباد ', '3886');
|
1232 |
+
cities[22] = new Array('رشتقون ', '3887');
|
1233 |
+
cities[23] = new Array('قشلاق ', '3888');
|
1234 |
+
cities[24] = new Array('خاکعلی ', '3889');
|
1235 |
+
cities[25] = new Array('لیا ', '3890');
|
1236 |
+
cities[26] = new Array('سگزآباد ', '3891');
|
1237 |
+
cities[27] = new Array('عصمت آباد ', '3892');
|
1238 |
+
cities[28] = new Array('خرم آباد ', '3893');
|
1239 |
+
cities[29] = new Array('اسفرورین ', '3894');
|
1240 |
+
cities[30] = new Array('شال ', '3895');
|
1241 |
+
cities[31] = new Array('دانسفهان ', '3896');
|
1242 |
+
cities[32] = new Array('قلعه هاشمخان ', '3897');
|
1243 |
+
cities[33] = new Array('گلنجین ', '3898');
|
1244 |
+
cities[34] = new Array('استلج ', '3899');
|
1245 |
+
cities[35] = new Array('آبگرم ', '3900');
|
1246 |
+
cities[36] = new Array('نیارج ', '3901');
|
1247 |
+
cities[37] = new Array('حصارولیعصر ', '3902');
|
1248 |
+
cities[38] = new Array('ماهین ', '3903');
|
1249 |
+
cities[39] = new Array('سیردان ', '3904');
|
1250 |
+
cities[40] = new Array('کبح ', '3905');
|
1251 |
+
cities[41] = new Array('سیاهپوش ', '3906');
|
1252 |
+
cities[42] = new Array('نیارک ', '3907');
|
1253 |
+
cities[43] = new Array('آقابابا ', '3908');
|
1254 |
+
cities[44] = new Array('خرم دشت ', '3909');
|
1255 |
+
cities[45] = new Array('نهاوند ', '3910');
|
1256 |
+
cities[46] = new Array('ضیاآباد ', '3911');
|
1257 |
+
cities[47] = new Array('حسین آباد ', '3912');
|
1258 |
+
cities[48] = new Array('رحیم آباد ', '3913');
|
1259 |
+
cities[49] = new Array('یحیی آباد ', '3914');
|
1260 |
+
cities[50] = new Array('نیکویه ', '3915');
|
1261 |
+
cities[51] = new Array('رازمیان ', '3916');
|
1262 |
+
cities[52] = new Array('کوهین ', '3917');
|
1263 |
+
cities[53] = new Array('ارداق ', '5602');
|
1264 |
+
cities[54] = new Array('نرجه', '5603');
|
1265 |
+
break;
|
1266 |
+
|
1267 |
+
case 'سمنان':
|
1268 |
+
case 'semnan':
|
1269 |
+
cities[1] = new Array('خیرآباد ', '3918');
|
1270 |
+
cities[2] = new Array('میاندره ', '3919');
|
1271 |
+
cities[3] = new Array('رضاآباد ', '3920');
|
1272 |
+
cities[4] = new Array('زرطول ', '3921');
|
1273 |
+
cities[5] = new Array('عطاری ', '3922');
|
1274 |
+
cities[6] = new Array('اهوان ', '3923');
|
1275 |
+
cities[7] = new Array('مشیریه ', '3924');
|
1276 |
+
cities[8] = new Array('جام ', '3925');
|
1277 |
+
cities[9] = new Array('دوزهیر ', '3926');
|
1278 |
+
cities[10] = new Array('معدن نمک ', '3927');
|
1279 |
+
cities[11] = new Array('نظامی ', '3928');
|
1280 |
+
cities[12] = new Array('اسدآباد ', '3929');
|
1281 |
+
cities[13] = new Array('لاسجرد ', '3930');
|
1282 |
+
cities[14] = new Array('سیدآباد ', '3931');
|
1283 |
+
cities[15] = new Array('عبداله آبادپائین ', '3932');
|
1284 |
+
cities[16] = new Array('بیابانک ', '3933');
|
1285 |
+
cities[17] = new Array('مومن آباد ', '3934');
|
1286 |
+
cities[18] = new Array('درجزین ', '3935');
|
1287 |
+
cities[19] = new Array('دربند ', '3936');
|
1288 |
+
cities[20] = new Array('گلرودبار ', '3937');
|
1289 |
+
cities[21] = new Array('آبگرم ', '3938');
|
1290 |
+
cities[22] = new Array('افتر ', '3939');
|
1291 |
+
cities[23] = new Array('فولاد محله ', '3940');
|
1292 |
+
cities[24] = new Array('ده صوفیان ', '3941');
|
1293 |
+
cities[25] = new Array('هیکو ', '3942');
|
1294 |
+
cities[26] = new Array('چاشم ', '3943');
|
1295 |
+
cities[27] = new Array('کردوان ', '3944');
|
1296 |
+
cities[28] = new Array('مندولک ', '3945');
|
1297 |
+
cities[29] = new Array('داورآباد ', '3946');
|
1298 |
+
cities[30] = new Array('ارادان ', '3947');
|
1299 |
+
cities[31] = new Array('رامه پائین ', '3948');
|
1300 |
+
cities[32] = new Array('بنکوه ', '3949');
|
1301 |
+
cities[33] = new Array('کهن آباد ', '3950');
|
1302 |
+
cities[34] = new Array('چمن آبادکوروس ', '3951');
|
1303 |
+
cities[35] = new Array('کرک ', '3952');
|
1304 |
+
cities[36] = new Array('گلستانک ', '3953');
|
1305 |
+
cities[37] = new Array('لجران ', '3954');
|
1306 |
+
cities[38] = new Array('جودانه ', '3955');
|
1307 |
+
cities[39] = new Array('ابراهیم آباد بالا ', '3956');
|
1308 |
+
cities[40] = new Array('بکران ', '3957');
|
1309 |
+
cities[41] = new Array('کردآباد ', '3958');
|
1310 |
+
cities[42] = new Array('نردین ', '3959');
|
1311 |
+
cities[43] = new Array('سوداغلن ', '3960');
|
1312 |
+
cities[44] = new Array('فرومه ', '3961');
|
1313 |
+
cities[45] = new Array('ابرسیج ', '3962');
|
1314 |
+
cities[46] = new Array('میغان ', '3963');
|
1315 |
+
cities[47] = new Array('قلعه نوخرقان ', '3964');
|
1316 |
+
cities[48] = new Array('چهل دختر نظامی ', '3965');
|
1317 |
+
cities[49] = new Array('کلاته خیج ', '3966');
|
1318 |
+
cities[50] = new Array('نگارمن ', '3967');
|
1319 |
+
cities[51] = new Array('ده ملا ', '3968');
|
1320 |
+
cities[52] = new Array('رویان ', '3969');
|
1321 |
+
cities[53] = new Array('بوشت ', '3970');
|
1322 |
+
cities[54] = new Array('سطوه ', '3971');
|
1323 |
+
cities[55] = new Array('طرود ', '3972');
|
1324 |
+
cities[56] = new Array('مغان ', '3973');
|
1325 |
+
cities[57] = new Array('گیور ', '3974');
|
1326 |
+
cities[58] = new Array('دستجرد ', '3975');
|
1327 |
+
cities[59] = new Array('مسیح آباد ', '3976');
|
1328 |
+
cities[60] = new Array('احمدآباد ', '3977');
|
1329 |
+
cities[61] = new Array('زمان آباد ', '3978');
|
1330 |
+
cities[62] = new Array('سلم رود ', '3979');
|
1331 |
+
cities[63] = new Array('جزن ', '3980');
|
1332 |
+
cities[64] = new Array('برم ', '3981');
|
1333 |
+
cities[65] = new Array('محمدآباد ', '3982');
|
1334 |
+
cities[66] = new Array('معصوم آباد ', '3983');
|
1335 |
+
cities[67] = new Array('فرات ', '3984');
|
1336 |
+
cities[68] = new Array('علیان ', '3985');
|
1337 |
+
cities[69] = new Array('عمروان ', '3986');
|
1338 |
+
cities[70] = new Array('قوشه ', '3987');
|
1339 |
+
cities[71] = new Array('دروار ', '3988');
|
1340 |
+
cities[72] = new Array('آستانه ', '3989');
|
1341 |
+
cities[73] = new Array('دیباج ', '3990');
|
1342 |
+
cities[74] = new Array('طزره ', '3991');
|
1343 |
+
cities[75] = new Array('مهماندوست ', '3992');
|
1344 |
+
cities[76] = new Array('کلاته ملا ', '3993');
|
1345 |
+
cities[77] = new Array('قدرت آباد ', '3994');
|
1346 |
+
cities[78] = new Array('علا ', '3604');
|
1347 |
+
cities[79] = new Array('آبخوری ', '3605');
|
1348 |
+
cities[80] = new Array('سرخه ', '3606');
|
1349 |
+
cities[81] = new Array('مهدی شهر ', '3607');
|
1350 |
+
cities[82] = new Array('شهمیرزاد ', '3608');
|
1351 |
+
cities[83] = new Array('گرمسار ', '3609');
|
1352 |
+
cities[84] = new Array('ایوانکی ', '3610');
|
1353 |
+
cities[85] = new Array('میامی ', '3611');
|
1354 |
+
cities[86] = new Array('بسطام ', '3612');
|
1355 |
+
cities[87] = new Array('مجن ', '3613');
|
1356 |
+
cities[88] = new Array('بیارجمند ', '3614');
|
1357 |
+
cities[89] = new Array('دامغان ', '3615');
|
1358 |
+
cities[90] = new Array('امیریه ', '3616');
|
1359 |
+
cities[91] = new Array('سمنان ', '3513');
|
1360 |
+
cities[92] = new Array('شاهرود', '3514');
|
1361 |
+
break;
|
1362 |
+
|
1363 |
+
case 'قم':
|
1364 |
+
case 'qom':
|
1365 |
+
cities[1] = new Array('قنوات ', '3617');
|
1366 |
+
cities[2] = new Array('دستجرد ', '3618');
|
1367 |
+
cities[3] = new Array('امیر آباد گنجه ', '3995');
|
1368 |
+
cities[4] = new Array('قمرود ', '3996');
|
1369 |
+
cities[5] = new Array('کهک ', '3997');
|
1370 |
+
cities[6] = new Array('قلعه چم ', '3998');
|
1371 |
+
cities[7] = new Array('قاهان ', '3999');
|
1372 |
+
cities[8] = new Array('شهر جعفریه ', '4000');
|
1373 |
+
cities[9] = new Array('جنداب ', '4001');
|
1374 |
+
cities[10] = new Array('سلفچگان ', '4002');
|
1375 |
+
cities[11] = new Array('قم', '3515');
|
1376 |
+
break;
|
1377 |
+
|
1378 |
+
case 'مرکزی':
|
1379 |
+
case 'markazi':
|
1380 |
+
cities[1] = new Array('محلات ', '3621');
|
1381 |
+
cities[2] = new Array('دلیجان ', '3622');
|
1382 |
+
cities[3] = new Array('خنداب ', '3623');
|
1383 |
+
cities[4] = new Array('کمیجان ', '3624');
|
1384 |
+
cities[5] = new Array('شازند ', '3625');
|
1385 |
+
cities[6] = new Array('آستانه ', '3626');
|
1386 |
+
cities[7] = new Array('خمین ', '3627');
|
1387 |
+
cities[8] = new Array('رباط مراد ', '3628');
|
1388 |
+
cities[9] = new Array('غرق آباد ', '3629');
|
1389 |
+
cities[10] = new Array('مامونیه ـ زرندیه ', '3630');
|
1390 |
+
cities[11] = new Array('تفرش ', '3631');
|
1391 |
+
cities[12] = new Array('آشتیان ', '3632');
|
1392 |
+
cities[13] = new Array('سلطان آباد ', '4016');
|
1393 |
+
cities[14] = new Array('اصفهانک ', '4017');
|
1394 |
+
cities[15] = new Array('حسین آباد ', '4018');
|
1395 |
+
cities[16] = new Array('خشک رود ', '4019');
|
1396 |
+
cities[17] = new Array('حکیم آباد ', '4020');
|
1397 |
+
cities[18] = new Array('یحیی آباد ', '4021');
|
1398 |
+
cities[19] = new Array('صدرآباد ', '4022');
|
1399 |
+
cities[20] = new Array('قطب صنعتی ', '4023');
|
1400 |
+
cities[21] = new Array('نیمور ', '4024');
|
1401 |
+
cities[22] = new Array('نخجیروان ', '4025');
|
1402 |
+
cities[23] = new Array('باقرآباد ', '4026');
|
1403 |
+
cities[24] = new Array('بزیجان ', '4027');
|
1404 |
+
cities[25] = new Array('عیسی آباد ', '4028');
|
1405 |
+
cities[26] = new Array('خورهه ', '4029');
|
1406 |
+
cities[27] = new Array('دودهک ', '4030');
|
1407 |
+
cities[28] = new Array('بیجگان ', '4031');
|
1408 |
+
cities[29] = new Array('خاوه ', '4032');
|
1409 |
+
cities[30] = new Array('نراق ', '4033');
|
1410 |
+
cities[31] = new Array('سینقان ', '4034');
|
1411 |
+
cities[32] = new Array('هستیجان ', '4035');
|
1412 |
+
cities[33] = new Array('کرهرود ', '4036');
|
1413 |
+
cities[34] = new Array('قنات ناصری ', '4037');
|
1414 |
+
cities[35] = new Array('ساروق ', '4038');
|
1415 |
+
cities[36] = new Array('داودآباد ', '4039');
|
1416 |
+
cities[37] = new Array('معصومیه ', '4040');
|
1417 |
+
cities[38] = new Array('انجدان ', '4041');
|
1418 |
+
cities[39] = new Array('دینه کبود ', '4042');
|
1419 |
+
cities[40] = new Array('حصارخنداب ', '4043');
|
1420 |
+
cities[41] = new Array('چیزان ', '4044');
|
1421 |
+
cities[42] = new Array('جاروسیان ', '4045');
|
1422 |
+
cities[43] = new Array('ادشته ', '4046');
|
1423 |
+
cities[44] = new Array('استوه ', '4047');
|
1424 |
+
cities[45] = new Array('سنجان ', '4048');
|
1425 |
+
cities[46] = new Array('اناج ', '4049');
|
1426 |
+
cities[47] = new Array('وفس ', '4050');
|
1427 |
+
cities[48] = new Array('خسروبیک ', '4051');
|
1428 |
+
cities[49] = new Array('میلاجرد ', '4052');
|
1429 |
+
cities[50] = new Array('سقاور ', '4053');
|
1430 |
+
cities[51] = new Array('هزاوه ', '4054');
|
1431 |
+
cities[52] = new Array('قدمگاه ', '4055');
|
1432 |
+
cities[53] = new Array('هفته ', '4056');
|
1433 |
+
cities[54] = new Array('لنجرود ', '4057');
|
1434 |
+
cities[55] = new Array('توره ', '4058');
|
1435 |
+
cities[56] = new Array('کزاز ', '4059');
|
1436 |
+
cities[57] = new Array('کتیران بالا ', '4060');
|
1437 |
+
cities[58] = new Array('نهرمیان ', '4061');
|
1438 |
+
cities[59] = new Array('سرسختی بالا ', '4062');
|
1439 |
+
cities[60] = new Array('لوزدرعلیا ', '4063');
|
1440 |
+
cities[61] = new Array('خنادرهوسطی ', '4064');
|
1441 |
+
cities[62] = new Array('هندودر ', '4065');
|
1442 |
+
cities[63] = new Array('تواندشت علیا ', '4066');
|
1443 |
+
cities[64] = new Array('مالمیر ', '4067');
|
1444 |
+
cities[65] = new Array('چهارچریک ', '4068');
|
1445 |
+
cities[66] = new Array('خیس آباد ', '4069');
|
1446 |
+
cities[67] = new Array('چهارچشمه ', '4070');
|
1447 |
+
cities[68] = new Array('لکان ', '4071');
|
1448 |
+
cities[69] = new Array('قورچی باشی ', '4072');
|
1449 |
+
cities[70] = new Array('ورچه ', '4073');
|
1450 |
+
cities[71] = new Array('فرقهان ', '4074');
|
1451 |
+
cities[72] = new Array('امامزاده ورچه ', '4075');
|
1452 |
+
cities[73] = new Array('رباط کمنسان ', '4076');
|
1453 |
+
cities[74] = new Array('ریحان علیا ', '4077');
|
1454 |
+
cities[75] = new Array('مزنق ', '4078');
|
1455 |
+
cities[76] = new Array('خورآوند ', '4079');
|
1456 |
+
cities[77] = new Array('شیجان علیا ', '4080');
|
1457 |
+
cities[78] = new Array('گلدشت ', '4081');
|
1458 |
+
cities[79] = new Array('دهنو ', '4082');
|
1459 |
+
cities[80] = new Array('نوبران ', '4083');
|
1460 |
+
cities[81] = new Array('قلعک ', '4084');
|
1461 |
+
cities[82] = new Array('یلاباد ', '4085');
|
1462 |
+
cities[83] = new Array('رازقان ', '4086');
|
1463 |
+
cities[84] = new Array('الویر ', '4087');
|
1464 |
+
cities[85] = new Array('دوزج ', '4088');
|
1465 |
+
cities[86] = new Array('علیشار ', '4089');
|
1466 |
+
cities[87] = new Array('بالقلو ', '4090');
|
1467 |
+
cities[88] = new Array('زاویه ', '4091');
|
1468 |
+
cities[89] = new Array('چمران ', '4092');
|
1469 |
+
cities[90] = new Array('ماقان ', '4093');
|
1470 |
+
cities[91] = new Array('سامان ', '4094');
|
1471 |
+
cities[92] = new Array('دخان ', '4095');
|
1472 |
+
cities[93] = new Array('مراغه ', '4096');
|
1473 |
+
cities[94] = new Array('فرمهین ', '4097');
|
1474 |
+
cities[95] = new Array('شهراب ', '4098');
|
1475 |
+
cities[96] = new Array('زاغر ', '4099');
|
1476 |
+
cities[97] = new Array('کهک ', '4100');
|
1477 |
+
cities[98] = new Array('فشک ', '4101');
|
1478 |
+
cities[99] = new Array('آهنگران ', '4102');
|
1479 |
+
cities[100] = new Array('علیان آباد ', '4103');
|
1480 |
+
cities[101] = new Array('مزرعهنو ', '4104');
|
1481 |
+
cities[102] = new Array('صالح آباد ', '4105');
|
1482 |
+
cities[103] = new Array('سیاوشان ', '4106');
|
1483 |
+
cities[104] = new Array('آهو ', '4107');
|
1484 |
+
cities[105] = new Array('پرندک ', '4108');
|
1485 |
+
cities[106] = new Array('اراک ', '3516');
|
1486 |
+
cities[107] = new Array('ساوه ', '3517');
|
1487 |
+
cities[108] = new Array('شهرک مهاجران', '3635');
|
1488 |
+
break;
|
1489 |
+
|
1490 |
+
case 'زنجان':
|
1491 |
+
case 'zanjan':
|
1492 |
+
cities[1] = new Array('زنجان ', '3521');
|
1493 |
+
cities[2] = new Array('محمودآباد ', '3196');
|
1494 |
+
cities[3] = new Array('باشقشلاق ', '3197');
|
1495 |
+
cities[4] = new Array('گرماب ', '3198');
|
1496 |
+
cities[5] = new Array('زرین آباد ـ ایجرود ', '3199');
|
1497 |
+
cities[6] = new Array('کهلا ', '3200');
|
1498 |
+
cities[7] = new Array('گیلوان ', '3201');
|
1499 |
+
cities[8] = new Array('دستجرده ', '3202');
|
1500 |
+
cities[9] = new Array('سعیدآباد ', '3203');
|
1501 |
+
cities[10] = new Array('چورزق ', '3204');
|
1502 |
+
cities[11] = new Array('حلب ', '3205');
|
1503 |
+
cities[12] = new Array('درام ', '3206');
|
1504 |
+
cities[13] = new Array(' آب بر ـ طارم ', '3207');
|
1505 |
+
cities[14] = new Array('زرین رود ', '3208');
|
1506 |
+
cities[15] = new Array('ماهنشان ', '3650');
|
1507 |
+
cities[16] = new Array('سلطانیه ', '3651');
|
1508 |
+
cities[17] = new Array('ابهر ', '3652');
|
1509 |
+
cities[18] = new Array('خرمدره ', '3653');
|
1510 |
+
cities[19] = new Array('قیدار ', '3654');
|
1511 |
+
cities[20] = new Array('همایون ', '4222');
|
1512 |
+
cities[21] = new Array('بوغداکندی ', '4223');
|
1513 |
+
cities[22] = new Array('اژدهاتو ', '4224');
|
1514 |
+
cities[23] = new Array('اسفجین ', '4225');
|
1515 |
+
cities[24] = new Array('ارمغان خانه ', '4226');
|
1516 |
+
cities[25] = new Array('قبله بلاغی ', '4227');
|
1517 |
+
cities[26] = new Array('پری ', '4228');
|
1518 |
+
cities[27] = new Array('اندآباد علیا ', '4229');
|
1519 |
+
cities[28] = new Array('قرهگل ', '4230');
|
1520 |
+
cities[29] = new Array('نیک پی ', '4231');
|
1521 |
+
cities[30] = new Array('دندی ', '4232');
|
1522 |
+
cities[31] = new Array('سونتو ', '4233');
|
1523 |
+
cities[32] = new Array('قلتوق ', '4234');
|
1524 |
+
cities[33] = new Array('گوزلدره سفلی ', '4235');
|
1525 |
+
cities[34] = new Array('سنبل آباد ', '4236');
|
1526 |
+
cities[35] = new Array('دره سجین ', '4237');
|
1527 |
+
cities[36] = new Array('دولت آباد ', '4238');
|
1528 |
+
cities[37] = new Array('کینهورس ', '4239');
|
1529 |
+
cities[38] = new Array('هیدج ', '4240');
|
1530 |
+
cities[39] = new Array('صائین قلعه ', '4241');
|
1531 |
+
cities[40] = new Array('اقبلاغ سفلی ', '4242');
|
1532 |
+
cities[41] = new Array('سهرورد ', '4243');
|
1533 |
+
cities[42] = new Array('کرسف ', '4244');
|
1534 |
+
cities[43] = new Array('سجاس', '4245');
|
1535 |
+
break;
|
1536 |
+
|
1537 |
+
case 'مازندران':
|
1538 |
+
case 'mazandaran':
|
1539 |
+
cities[1] = new Array('شیرنگ علیا ', '4340');
|
1540 |
+
cities[2] = new Array('مارون کلاته ', '4341');
|
1541 |
+
cities[3] = new Array('مزرعه کتول ', '4342');
|
1542 |
+
cities[4] = new Array('حاجی کلاته ', '4343');
|
1543 |
+
cities[5] = new Array('بدراقنوری ', '4344');
|
1544 |
+
cities[6] = new Array('خولیندره ', '4345');
|
1545 |
+
cities[7] = new Array('گامیشلی ', '4331');
|
1546 |
+
cities[8] = new Array('قرنجیک ', '4332');
|
1547 |
+
cities[9] = new Array('قلعه محمود ', '4333');
|
1548 |
+
cities[10] = new Array('کفشگری ', '4334');
|
1549 |
+
cities[11] = new Array('بالاجاده ', '4317');
|
1550 |
+
cities[12] = new Array('میاندره ', '4320');
|
1551 |
+
cities[13] = new Array('ایلوار ', '4321');
|
1552 |
+
cities[14] = new Array('زلکلان ', '4322');
|
1553 |
+
cities[15] = new Array('یساقی ', '4323');
|
1554 |
+
cities[16] = new Array('بندپی ', '4324');
|
1555 |
+
cities[17] = new Array('مهتر کلا ', '4325');
|
1556 |
+
cities[18] = new Array('داوکان ', '4326');
|
1557 |
+
cities[19] = new Array('قره قاشلی ', '4327');
|
1558 |
+
cities[20] = new Array('پنج پیکر ', '4328');
|
1559 |
+
cities[21] = new Array('خواجه نفس ', '4329');
|
1560 |
+
cities[22] = new Array('گلوگاه ـ بابل ', '5608');
|
1561 |
+
cities[23] = new Array('ایزدشهر ', '5609');
|
1562 |
+
cities[24] = new Array('تقی آباد ', '4336');
|
1563 |
+
cities[25] = new Array('پیرواش ', '4337');
|
1564 |
+
cities[26] = new Array('جعفرآبادنامتلو ', '4348');
|
1565 |
+
cities[27] = new Array('شش آب ', '4349');
|
1566 |
+
cities[28] = new Array('کوچک خرطومه ', '4350');
|
1567 |
+
cities[29] = new Array('ایمرملاساری ', '4351');
|
1568 |
+
cities[30] = new Array('بیبی شیروان ', '4352');
|
1569 |
+
cities[31] = new Array('تنگراه ', '4367');
|
1570 |
+
cities[32] = new Array('صالح آباد چولی ', '4368');
|
1571 |
+
cities[33] = new Array('کیارام ', '4369');
|
1572 |
+
cities[34] = new Array('دوزین ', '4370');
|
1573 |
+
cities[35] = new Array('قلعه قافه ', '4371');
|
1574 |
+
cities[36] = new Array('کنگور ', '4372');
|
1575 |
+
cities[37] = new Array('بالایشیخکین گلین ', '4373');
|
1576 |
+
cities[38] = new Array('پیشکمر ', '4374');
|
1577 |
+
cities[39] = new Array('بیشک تپه ', '4375');
|
1578 |
+
cities[40] = new Array('مراوه تپه ', '4376');
|
1579 |
+
cities[41] = new Array('قرهگل شرقی ', '4377');
|
1580 |
+
cities[42] = new Array('عزیز آباد ', '4378');
|
1581 |
+
cities[43] = new Array('یانبلاغ ', '4379');
|
1582 |
+
cities[44] = new Array('زرگر محله ', '4380');
|
1583 |
+
cities[45] = new Array('مرزی کلا ', '4381');
|
1584 |
+
cities[46] = new Array('رودپی ', '4382');
|
1585 |
+
cities[47] = new Array('معدن قشلاقی ', '4354');
|
1586 |
+
cities[48] = new Array('فارسیان ', '4355');
|
1587 |
+
cities[49] = new Array('خوش ییلاق ', '4356');
|
1588 |
+
cities[50] = new Array('تاتارعلیا ', '4357');
|
1589 |
+
cities[51] = new Array('پشمک نیاده ', '4358');
|
1590 |
+
cities[52] = new Array('باغلی مارامه ', '4359');
|
1591 |
+
cities[53] = new Array('داشلی برون ', '4360');
|
1592 |
+
cities[54] = new Array('دیگچه ', '4361');
|
1593 |
+
cities[55] = new Array('حاجیقوشان ', '4362');
|
1594 |
+
cities[56] = new Array('سارجهگر ', '4363');
|
1595 |
+
cities[57] = new Array('کرند ', '4364');
|
1596 |
+
cities[58] = new Array('آمل ', '3522');
|
1597 |
+
cities[59] = new Array('بابل ', '3523');
|
1598 |
+
cities[60] = new Array('ساری ', '3524');
|
1599 |
+
cities[61] = new Array('معلم کلاء ', '3209');
|
1600 |
+
cities[62] = new Array('سرخرود ', '3210');
|
1601 |
+
cities[63] = new Array('وسطی کلاء ', '3211');
|
1602 |
+
cities[64] = new Array('رینه ', '3212');
|
1603 |
+
cities[65] = new Array('سوا ', '3213');
|
1604 |
+
cities[66] = new Array('بایجان ', '3214');
|
1605 |
+
cities[67] = new Array('گزنک ', '3215');
|
1606 |
+
cities[68] = new Array('چمستان ', '3216');
|
1607 |
+
cities[69] = new Array('بنفشه ده ', '3217');
|
1608 |
+
cities[70] = new Array('رئیس کلالاویج ', '3218');
|
1609 |
+
cities[71] = new Array('اوزه ', '3219');
|
1610 |
+
cities[72] = new Array('بلده ', '3220');
|
1611 |
+
cities[73] = new Array('تاکر ', '3221');
|
1612 |
+
cities[74] = new Array('گلنده رود ', '3222');
|
1613 |
+
cities[75] = new Array('چلندر ', '3223');
|
1614 |
+
cities[76] = new Array('صلاح الدین کلاء ', '3224');
|
1615 |
+
cities[77] = new Array('نارنجبن ', '3225');
|
1616 |
+
cities[78] = new Array('رویانشهر ', '3226');
|
1617 |
+
cities[79] = new Array('کجور ', '3227');
|
1618 |
+
cities[80] = new Array('پولکجور ', '3228');
|
1619 |
+
cities[81] = new Array('لشکنار ', '3229');
|
1620 |
+
cities[82] = new Array('هچیرود ', '3230');
|
1621 |
+
cities[83] = new Array('مرزن آباد ', '3231');
|
1622 |
+
cities[84] = new Array('کردیچال ', '3232');
|
1623 |
+
cities[85] = new Array('کلاردشت ', '3233');
|
1624 |
+
cities[86] = new Array('کلنو ', '3234');
|
1625 |
+
cities[87] = new Array('دلیر ', '3235');
|
1626 |
+
cities[88] = new Array('سیاه پیشه ', '3236');
|
1627 |
+
cities[89] = new Array('کلارآباد ', '3237');
|
1628 |
+
cities[90] = new Array('عباس آباد ', '3238');
|
1629 |
+
cities[91] = new Array('سرلنگا ', '3239');
|
1630 |
+
cities[92] = new Array('کترا ', '3240');
|
1631 |
+
cities[93] = new Array('گلعلی آباد ', '3241');
|
1632 |
+
cities[94] = new Array('میانکوه دوهزار ', '3242');
|
1633 |
+
cities[95] = new Array('مهران سه هزار ', '3243');
|
1634 |
+
cities[96] = new Array('نشتارود ', '3244');
|
1635 |
+
cities[97] = new Array('قلعه گردن ', '3245');
|
1636 |
+
cities[98] = new Array('خرم آباد ', '3246');
|
1637 |
+
cities[99] = new Array('شیرود ', '3247');
|
1638 |
+
cities[100] = new Array('سلیمان آباد ', '3248');
|
1639 |
+
cities[101] = new Array('کشکو ', '3249');
|
1640 |
+
cities[102] = new Array('لاکتراشان ', '3250');
|
1641 |
+
cities[103] = new Array('سادات محله ', '3251');
|
1642 |
+
cities[104] = new Array('کتالم ', '3252');
|
1643 |
+
cities[105] = new Array('اغوزکتی ', '3253');
|
1644 |
+
cities[106] = new Array('جواهرده ', '3254');
|
1645 |
+
cities[107] = new Array('جفت رودبار ', '3255');
|
1646 |
+
cities[108] = new Array('تهل ', '3256');
|
1647 |
+
cities[109] = new Array('خوشرودپی ', '3257');
|
1648 |
+
cities[110] = new Array('آهنگرکلا ', '3258');
|
1649 |
+
cities[111] = new Array('گاون کلا ', '3259');
|
1650 |
+
cities[112] = new Array('وقبله ', '4246');
|
1651 |
+
cities[113] = new Array('شورکش ', '4247');
|
1652 |
+
cities[114] = new Array('اینچهدان ', '4248');
|
1653 |
+
cities[115] = new Array('عرب خیل ', '4249');
|
1654 |
+
cities[116] = new Array('بهنمیر ', '4250');
|
1655 |
+
cities[117] = new Array('کاسگرمحله ', '4251');
|
1656 |
+
cities[118] = new Array('کله بست ', '4252');
|
1657 |
+
cities[119] = new Array('بیشه سر ', '4253');
|
1658 |
+
cities[120] = new Array('گنج افروز ', '4254');
|
1659 |
+
cities[121] = new Array('گتاب ', '4255');
|
1660 |
+
cities[122] = new Array('دابودشت ', '4256');
|
1661 |
+
cities[123] = new Array('درازکش ', '4257');
|
1662 |
+
cities[124] = new Array('گردرودبار ', '4258');
|
1663 |
+
cities[125] = new Array('شهیدآباد ', '4259');
|
1664 |
+
cities[126] = new Array('احمد چاله پس ', '4260');
|
1665 |
+
cities[127] = new Array('بالا جنید ', '4261');
|
1666 |
+
cities[128] = new Array('خطیر کلاء ', '4262');
|
1667 |
+
cities[129] = new Array('حاجی کلاء صنم ', '4263');
|
1668 |
+
cities[130] = new Array('واسکس ', '4264');
|
1669 |
+
cities[131] = new Array('قادیکلاء ', '4265');
|
1670 |
+
cities[132] = new Array('دیکنده ', '4266');
|
1671 |
+
cities[133] = new Array('کفشگرکلااوطه ', '4267');
|
1672 |
+
cities[134] = new Array('کیا کلا ', '4268');
|
1673 |
+
cities[135] = new Array('بالادسته ', '4269');
|
1674 |
+
cities[136] = new Array('بیزکی ', '4270');
|
1675 |
+
cities[137] = new Array('کوهی خیل ', '4271');
|
1676 |
+
cities[138] = new Array('سنگتاب ', '4272');
|
1677 |
+
cities[139] = new Array('رکابدارکلا ', '4273');
|
1678 |
+
cities[140] = new Array('شیر کلا ', '4274');
|
1679 |
+
cities[141] = new Array('آلاشت ', '4275');
|
1680 |
+
cities[142] = new Array('لغور ', '4276');
|
1681 |
+
cities[143] = new Array('اتو ', '4277');
|
1682 |
+
cities[144] = new Array('شیرگاه ', '4278');
|
1683 |
+
cities[145] = new Array('پالند ', '4279');
|
1684 |
+
cities[146] = new Array('چرات ', '4280');
|
1685 |
+
cities[147] = new Array('دهمیان ', '4281');
|
1686 |
+
cities[148] = new Array('خشکدره ', '4282');
|
1687 |
+
cities[149] = new Array('امافت ', '4283');
|
1688 |
+
cities[150] = new Array('دو آب ', '4284');
|
1689 |
+
cities[151] = new Array('ورسک ', '4285');
|
1690 |
+
cities[152] = new Array('کتی لته ', '4286');
|
1691 |
+
cities[153] = new Array('اروست ', '4287');
|
1692 |
+
cities[154] = new Array('فریم ', '4288');
|
1693 |
+
cities[155] = new Array('سنگده ', '4289');
|
1694 |
+
cities[156] = new Array('قادیکلا ', '4290');
|
1695 |
+
cities[157] = new Array('تاکام ', '4291');
|
1696 |
+
cities[158] = new Array('هولار ', '4292');
|
1697 |
+
cities[159] = new Array('اسبوکلا ', '4293');
|
1698 |
+
cities[160] = new Array('سورک ', '4294');
|
1699 |
+
cities[161] = new Array('اسلام آباد ', '4295');
|
1700 |
+
cities[162] = new Array('گهرباران ', '4296');
|
1701 |
+
cities[163] = new Array('فرخ آباد ', '4297');
|
1702 |
+
cities[164] = new Array('داراب کلاء ', '4298');
|
1703 |
+
cities[165] = new Array('ماچک پشت ', '4299');
|
1704 |
+
cities[166] = new Array('خورشید ', '4300');
|
1705 |
+
cities[167] = new Array('زاغمرز ', '4301');
|
1706 |
+
cities[168] = new Array('چلمردی ', '4302');
|
1707 |
+
cities[169] = new Array('رستم کلا ', '4303');
|
1708 |
+
cities[170] = new Array('پائین زرندین ', '4304');
|
1709 |
+
cities[171] = new Array('بارابسر ', '4305');
|
1710 |
+
cities[172] = new Array('تیر تاش ', '4306');
|
1711 |
+
cities[173] = new Array('خلیل شهر ', '4307');
|
1712 |
+
cities[174] = new Array('حسین آباد ', '4308');
|
1713 |
+
cities[175] = new Array('دامداری حسن ابوطا ', '4309');
|
1714 |
+
cities[176] = new Array('بشیرینه ', '4310');
|
1715 |
+
cities[177] = new Array('سفیدچاه ', '4311');
|
1716 |
+
cities[178] = new Array('دامداری مجریان ', '4312');
|
1717 |
+
cities[179] = new Array('محمودآباد ', '3655');
|
1718 |
+
cities[180] = new Array('نور ', '3656');
|
1719 |
+
cities[181] = new Array('نوشهر ', '3657');
|
1720 |
+
cities[182] = new Array('چالوس ', '3658');
|
1721 |
+
cities[183] = new Array('سلمانشهر ', '3659');
|
1722 |
+
cities[184] = new Array('تنکابن ', '3660');
|
1723 |
+
cities[185] = new Array('رامسر ', '3661');
|
1724 |
+
cities[186] = new Array('امیرکلا ', '3662');
|
1725 |
+
cities[187] = new Array('بابلسر ', '3663');
|
1726 |
+
cities[188] = new Array('فریدون کنار ', '3664');
|
1727 |
+
cities[189] = new Array('قائم شهر ', '3665');
|
1728 |
+
cities[190] = new Array('جویبار ', '3666');
|
1729 |
+
cities[191] = new Array('زیرآب ', '3667');
|
1730 |
+
cities[192] = new Array('پل سفید ـ سوادکوه ', '3668');
|
1731 |
+
cities[193] = new Array('کیاسر ', '3669');
|
1732 |
+
cities[194] = new Array('نکاء ', '3670');
|
1733 |
+
cities[195] = new Array('بهشهر ', '3671');
|
1734 |
+
cities[196] = new Array('گلوگاه', '3672');
|
1735 |
+
break;
|
1736 |
+
|
1737 |
+
case 'گلستان':
|
1738 |
+
case 'golestan':
|
1739 |
+
cities[1] = new Array('گرگان ', '3525');
|
1740 |
+
cities[2] = new Array('بندر گز ', '3673');
|
1741 |
+
cities[3] = new Array('کردکوی ', '3674');
|
1742 |
+
cities[4] = new Array('بندرترکمن ', '3675');
|
1743 |
+
cities[5] = new Array('آق قلا ', '3676');
|
1744 |
+
cities[6] = new Array('علی آباد ', '3677');
|
1745 |
+
cities[7] = new Array('آزادشهر ', '3678');
|
1746 |
+
cities[8] = new Array('گنبدکاوس ', '3679');
|
1747 |
+
cities[9] = new Array('مینودشت ', '3680');
|
1748 |
+
cities[10] = new Array('کلاله ', '3681');
|
1749 |
+
cities[11] = new Array('خان ببین ', '4346');
|
1750 |
+
cities[12] = new Array('دلند ', '4347');
|
1751 |
+
cities[13] = new Array('سرخن کلاته ', '4335');
|
1752 |
+
cities[14] = new Array('نوده خاندوز ', '4353');
|
1753 |
+
cities[15] = new Array('گالیکش ', '4365');
|
1754 |
+
cities[16] = new Array('جلین ', '4366');
|
1755 |
+
cities[17] = new Array('نگین شهر ', '4318');
|
1756 |
+
cities[18] = new Array('سیمین شهر ', '4319');
|
1757 |
+
cities[19] = new Array('نوکنده ', '4313');
|
1758 |
+
cities[20] = new Array('اینچه برون ', '4314');
|
1759 |
+
cities[21] = new Array('مراوه تپه ', '4315');
|
1760 |
+
cities[22] = new Array('رامیان ', '4316');
|
1761 |
+
cities[23] = new Array('گمیش تپه ', '4330');
|
1762 |
+
cities[24] = new Array('انبار آلوم ', '4338');
|
1763 |
+
cities[25] = new Array('فاضل آباد', '4339');
|
1764 |
+
break;
|
1765 |
+
|
1766 |
+
case 'اردبیل':
|
1767 |
+
case 'ardabil':
|
1768 |
+
cities[1] = new Array('اردبیل ', '3532');
|
1769 |
+
cities[2] = new Array('نمین ', '3700');
|
1770 |
+
cities[3] = new Array('نیر ', '3701');
|
1771 |
+
cities[4] = new Array('گرمی ', '3702');
|
1772 |
+
cities[5] = new Array('مشکین شهر ', '3703');
|
1773 |
+
cities[6] = new Array('بیله سوار ', '3704');
|
1774 |
+
cities[7] = new Array('خلخال ', '3705');
|
1775 |
+
cities[8] = new Array('پارس آباد ', '3706');
|
1776 |
+
cities[9] = new Array('ابی بیگلو ', '4514');
|
1777 |
+
cities[10] = new Array('نانهکران ', '4515');
|
1778 |
+
cities[11] = new Array('عنبران ', '4516');
|
1779 |
+
cities[12] = new Array('گرده ', '4517');
|
1780 |
+
cities[13] = new Array('ثمرین ', '4518');
|
1781 |
+
cities[14] = new Array('اردی موسی ', '4519');
|
1782 |
+
cities[15] = new Array('سرعین ', '4520');
|
1783 |
+
cities[16] = new Array('کوارئیم ', '4521');
|
1784 |
+
cities[17] = new Array('اسلام آباد ', '4522');
|
1785 |
+
cities[18] = new Array('مهماندوست ', '4523');
|
1786 |
+
cities[19] = new Array('هیر ', '4524');
|
1787 |
+
cities[20] = new Array('بقرآباد ', '4525');
|
1788 |
+
cities[21] = new Array('بودالالو ', '4526');
|
1789 |
+
cities[22] = new Array('ارالوی بزرگ ', '4527');
|
1790 |
+
cities[23] = new Array('دیزج ', '4528');
|
1791 |
+
cities[24] = new Array('حمزه خانلو ', '4529');
|
1792 |
+
cities[25] = new Array('زهرا ', '4530');
|
1793 |
+
cities[26] = new Array('انی علیا ', '4531');
|
1794 |
+
cities[27] = new Array('قاسمکندی ', '4532');
|
1795 |
+
cities[28] = new Array('تازه کند انگوت ', '4533');
|
1796 |
+
cities[29] = new Array('قره اغاج پائین ', '4534');
|
1797 |
+
cities[30] = new Array('پریخان ', '4535');
|
1798 |
+
cities[31] = new Array('قصابه ', '4536');
|
1799 |
+
cities[32] = new Array('فخرآباد ', '4537');
|
1800 |
+
cities[33] = new Array('رضی ', '4538');
|
1801 |
+
cities[34] = new Array('قوشه سفلی ', '4539');
|
1802 |
+
cities[35] = new Array('مرادلو ', '4540');
|
1803 |
+
cities[36] = new Array('گنجوبه ', '4541');
|
1804 |
+
cities[37] = new Array('گوگ تپه ', '4542');
|
1805 |
+
cities[38] = new Array('انجیر لو ', '4543');
|
1806 |
+
cities[39] = new Array('جعفرآباد ', '4544');
|
1807 |
+
cities[40] = new Array('آغداش کلام ', '4545');
|
1808 |
+
cities[41] = new Array('خورخور سفلی ', '4546');
|
1809 |
+
cities[42] = new Array('شورگل ', '4547');
|
1810 |
+
cities[43] = new Array('نظرعلی بلاغی ', '4548');
|
1811 |
+
cities[44] = new Array('لنبر ', '4549');
|
1812 |
+
cities[45] = new Array('فیروزآباد ', '4550');
|
1813 |
+
cities[46] = new Array('گیوی ـ کوثر ', '4551');
|
1814 |
+
cities[47] = new Array('خلف لو ', '4552');
|
1815 |
+
cities[48] = new Array('هشتجین ', '4553');
|
1816 |
+
cities[49] = new Array('برندق ', '4554');
|
1817 |
+
cities[50] = new Array('کلور ', '4555');
|
1818 |
+
cities[51] = new Array('تازه کندقدیم ', '4556');
|
1819 |
+
cities[52] = new Array('گوشلو ', '4557');
|
1820 |
+
cities[53] = new Array('اققباق سفلی ', '4558');
|
1821 |
+
cities[54] = new Array('شهرک شهید غفاری ', '4559');
|
1822 |
+
cities[55] = new Array('اصلاندوز ', '4560');
|
1823 |
+
cities[56] = new Array('بلانعلیا ', '4561');
|
1824 |
+
cities[57] = new Array('لاهرود', '4562');
|
1825 |
+
break;
|
1826 |
+
|
1827 |
+
case 'آذربایجان غربی':
|
1828 |
+
case 'azarbaijan - west':
|
1829 |
+
case 'azarbaijan-west':
|
1830 |
+
cities[1] = new Array('باراندوز ', '4563');
|
1831 |
+
cities[2] = new Array('دیزج دول ', '4564');
|
1832 |
+
cities[3] = new Array('ابگرم ', '4565');
|
1833 |
+
cities[4] = new Array('سرنق ', '4566');
|
1834 |
+
cities[5] = new Array('چهریق علیا ', '4567');
|
1835 |
+
cities[6] = new Array('داراب ', '4568');
|
1836 |
+
cities[7] = new Array('دلزی ', '4569');
|
1837 |
+
cities[8] = new Array('اغ برزه ', '4570');
|
1838 |
+
cities[9] = new Array('سنجی ', '4571');
|
1839 |
+
cities[10] = new Array('کیک آباد ', '4572');
|
1840 |
+
cities[11] = new Array('خاتون باغ ', '4573');
|
1841 |
+
cities[12] = new Array('حاجی حسن ', '4574');
|
1842 |
+
cities[13] = new Array('سوگلی تپه ', '4575');
|
1843 |
+
cities[14] = new Array('کلیجه ', '4576');
|
1844 |
+
cities[15] = new Array('حاجیکند ', '4577');
|
1845 |
+
cities[16] = new Array('باغچه ', '4578');
|
1846 |
+
cities[17] = new Array('خورخوره ', '4579');
|
1847 |
+
cities[18] = new Array('کاولان علیا ', '4580');
|
1848 |
+
cities[19] = new Array('سیاقول علیا ', '4581');
|
1849 |
+
cities[20] = new Array('اگریقاش ', '4582');
|
1850 |
+
cities[21] = new Array('اوزوندره علیا ', '4583');
|
1851 |
+
cities[22] = new Array('یکشوه ', '4584');
|
1852 |
+
cities[23] = new Array('جوانمرد ', '4585');
|
1853 |
+
cities[24] = new Array('اغتطر ', '4586');
|
1854 |
+
cities[25] = new Array('سیمینه ', '4587');
|
1855 |
+
cities[26] = new Array('رحیمخان ', '4588');
|
1856 |
+
cities[27] = new Array('گلتپه قورمیش ', '4589');
|
1857 |
+
cities[28] = new Array('سلماش ', '4590');
|
1858 |
+
cities[29] = new Array('اسلام آباد ', '4591');
|
1859 |
+
cities[30] = new Array('بیوران سفلی ', '4592');
|
1860 |
+
cities[31] = new Array('زمزیران ', '4593');
|
1861 |
+
cities[32] = new Array('ربط ', '4594');
|
1862 |
+
cities[33] = new Array('کشاورز (اقبال) ', '4595');
|
1863 |
+
cities[34] = new Array('ملا شهاب الدین ', '4596');
|
1864 |
+
cities[35] = new Array('للکلو ', '4597');
|
1865 |
+
cities[36] = new Array('بکتاش ', '4598');
|
1866 |
+
cities[37] = new Array('چهاربرج قدیم ', '4599');
|
1867 |
+
cities[38] = new Array('گوگ تپه خالصه ', '4600');
|
1868 |
+
cities[39] = new Array('تک آغاج ', '4601');
|
1869 |
+
cities[40] = new Array('هاچاسو ', '4602');
|
1870 |
+
cities[41] = new Array('هولاسو ', '4603');
|
1871 |
+
cities[42] = new Array('قوزلوی افشار ', '4604');
|
1872 |
+
cities[43] = new Array('محمودآباد ', '4605');
|
1873 |
+
cities[44] = new Array('الیچین ', '4606');
|
1874 |
+
cities[45] = new Array('حیدرباغی ', '4607');
|
1875 |
+
cities[46] = new Array('حمزه قاسم ', '4608');
|
1876 |
+
cities[47] = new Array('اوغولبیگ ', '4609');
|
1877 |
+
cities[48] = new Array('دورباش ', '4610');
|
1878 |
+
cities[49] = new Array('اقابیگ ', '4611');
|
1879 |
+
cities[50] = new Array('احمدآبادسفلی ', '4612');
|
1880 |
+
cities[51] = new Array('باروق ', '4613');
|
1881 |
+
cities[52] = new Array('سیلوانا ', '3707');
|
1882 |
+
cities[53] = new Array('قوشچی ', '3708');
|
1883 |
+
cities[54] = new Array('نقده ', '3709');
|
1884 |
+
cities[55] = new Array('ارومیه ', '3533');
|
1885 |
+
cities[56] = new Array('سیلوه ', '3534');
|
1886 |
+
cities[57] = new Array('خوی ', '3535');
|
1887 |
+
cities[58] = new Array('مهاباد ', '3536');
|
1888 |
+
cities[59] = new Array('اشنویه ', '3057');
|
1889 |
+
cities[60] = new Array('پیرانشهر ', '3058');
|
1890 |
+
cities[61] = new Array('جلدیان ', '3059');
|
1891 |
+
cities[62] = new Array('ایواوغلی ', '3060');
|
1892 |
+
cities[63] = new Array('دیزجدیز ', '3061');
|
1893 |
+
cities[64] = new Array('فیرورق ', '3062');
|
1894 |
+
cities[65] = new Array('قره ضیاء الدین ـ چایپاره ', '3063');
|
1895 |
+
cities[66] = new Array('ماکو ', '3064');
|
1896 |
+
cities[67] = new Array('سیه چشمه ـ چالدران ', '3065');
|
1897 |
+
cities[68] = new Array('سلماس ', '3066');
|
1898 |
+
cities[69] = new Array('تازه شهر ', '3067');
|
1899 |
+
cities[70] = new Array('گوگ تپه ', '3068');
|
1900 |
+
cities[71] = new Array('کتیکه ', '3069');
|
1901 |
+
cities[72] = new Array('بوکان ', '3070');
|
1902 |
+
cities[73] = new Array('سردشت ', '3071');
|
1903 |
+
cities[74] = new Array('میاندوآب ', '3072');
|
1904 |
+
cities[75] = new Array('شاهین دژ ', '3073');
|
1905 |
+
cities[76] = new Array('تکاب ', '3074');
|
1906 |
+
cities[77] = new Array('میاوق ', '2913');
|
1907 |
+
cities[78] = new Array('ایبلو ', '2914');
|
1908 |
+
cities[79] = new Array('دستجرد ', '2915');
|
1909 |
+
cities[80] = new Array('نوشین شهر ', '2916');
|
1910 |
+
cities[81] = new Array('طلا تپه ', '2917');
|
1911 |
+
cities[82] = new Array('راژان ', '2918');
|
1912 |
+
cities[83] = new Array('هاشم آباد ', '2919');
|
1913 |
+
cities[84] = new Array('دیزج ', '2920');
|
1914 |
+
cities[85] = new Array('زیوه ', '2921');
|
1915 |
+
cities[86] = new Array('توئی ', '2922');
|
1916 |
+
cities[87] = new Array('موانا ', '2923');
|
1917 |
+
cities[88] = new Array('قره باغ ', '2924');
|
1918 |
+
cities[89] = new Array('بهله ', '2925');
|
1919 |
+
cities[90] = new Array('امامکندی ', '2926');
|
1920 |
+
cities[91] = new Array('نازلو ', '2927');
|
1921 |
+
cities[92] = new Array('سرو ', '2928');
|
1922 |
+
cities[93] = new Array('کانسپی ', '2929');
|
1923 |
+
cities[94] = new Array('ممکان ', '2930');
|
1924 |
+
cities[95] = new Array('میرآباد ', '2931');
|
1925 |
+
cities[96] = new Array('حسنلو ', '2932');
|
1926 |
+
cities[97] = new Array('کهریز عجم ', '2933');
|
1927 |
+
cities[98] = new Array('محمد یار ', '2934');
|
1928 |
+
cities[99] = new Array('شیخ احمد ', '2935');
|
1929 |
+
cities[100] = new Array('بیگی مقلعه ', '2936');
|
1930 |
+
cities[101] = new Array('راهدانه ', '2937');
|
1931 |
+
cities[102] = new Array('شاهوانه ', '2938');
|
1932 |
+
cities[103] = new Array('نالوس ', '2939');
|
1933 |
+
cities[104] = new Array('ده شمس بزرگ ', '2940');
|
1934 |
+
cities[105] = new Array('گلاز ', '2941');
|
1935 |
+
cities[106] = new Array('لولکان ', '2942');
|
1936 |
+
cities[107] = new Array('سیاوان ', '2943');
|
1937 |
+
cities[108] = new Array('کلهکین ', '2944');
|
1938 |
+
cities[109] = new Array('شین آباد ', '2945');
|
1939 |
+
cities[110] = new Array('چیانه ', '2946');
|
1940 |
+
cities[111] = new Array('بیکوس ', '2947');
|
1941 |
+
cities[112] = new Array('هنگاباد ', '2948');
|
1942 |
+
cities[113] = new Array('گردکشانه ', '2949');
|
1943 |
+
cities[114] = new Array('پسوه ', '2950');
|
1944 |
+
cities[115] = new Array('ریگ آباد ', '2951');
|
1945 |
+
cities[116] = new Array('احمد غریب ', '2952');
|
1946 |
+
cities[117] = new Array('سیهباز ', '2953');
|
1947 |
+
cities[118] = new Array('بیله وار ', '2954');
|
1948 |
+
cities[119] = new Array('ولدیان ', '2955');
|
1949 |
+
cities[120] = new Array('قوروق ', '2956');
|
1950 |
+
cities[121] = new Array('هندوان ', '2957');
|
1951 |
+
cities[122] = new Array('بدلان ', '2958');
|
1952 |
+
cities[123] = new Array('بلسورسفلی ', '2959');
|
1953 |
+
cities[124] = new Array('زورآباد ', '2960');
|
1954 |
+
cities[125] = new Array('استران ', '2961');
|
1955 |
+
cities[126] = new Array('قطور ', '2962');
|
1956 |
+
cities[127] = new Array('شیرین بلاغی ', '2963');
|
1957 |
+
cities[128] = new Array('مراکان ', '2964');
|
1958 |
+
cities[129] = new Array('چورس ', '2965');
|
1959 |
+
cities[130] = new Array('قورول علیا ', '2966');
|
1960 |
+
cities[131] = new Array('بسطام ', '2967');
|
1961 |
+
cities[132] = new Array('قرهتپه ', '2968');
|
1962 |
+
cities[133] = new Array('ریحانلوی علیا ', '2969');
|
1963 |
+
cities[134] = new Array('زاویه سفلی ', '2970');
|
1964 |
+
cities[135] = new Array('آواجیق (کلیسا کندی) ', '2971');
|
1965 |
+
cities[136] = new Array('بازرگان ', '2972');
|
1966 |
+
cities[137] = new Array('قمقشلاق علیا ', '2973');
|
1967 |
+
cities[138] = new Array('یولاگلدی ', '2974');
|
1968 |
+
cities[139] = new Array('قرنقو ', '2975');
|
1969 |
+
cities[140] = new Array('شوط ', '2976');
|
1970 |
+
cities[141] = new Array('پلدشت ', '2977');
|
1971 |
+
cities[142] = new Array('نازک علیا ', '2978');
|
1972 |
+
cities[143] = new Array('حسنکندی ', '2979');
|
1973 |
+
cities[144] = new Array('وردان ', '2980');
|
1974 |
+
cities[145] = new Array('قرهقشلاق ', '2981');
|
1975 |
+
cities[146] = new Array('تمر', '2982');
|
1976 |
+
break;
|
1977 |
+
|
1978 |
+
case 'همدان':
|
1979 |
+
case 'hamadan':
|
1980 |
+
case 'hamdan':
|
1981 |
+
case 'hamedan':
|
1982 |
+
cities[1] = new Array('همدان ', '3540');
|
1983 |
+
cities[2] = new Array('بهار ', '3088');
|
1984 |
+
cities[3] = new Array('اسدآباد ', '3089');
|
1985 |
+
cities[4] = new Array('کبودرآهنگ ', '3090');
|
1986 |
+
cities[5] = new Array('فامنین ', '3091');
|
1987 |
+
cities[6] = new Array('ملایر ', '3092');
|
1988 |
+
cities[7] = new Array('تویسرکان ', '3093');
|
1989 |
+
cities[8] = new Array('نهاوند ', '3094');
|
1990 |
+
cities[9] = new Array('حسین آباد ', '3126');
|
1991 |
+
cities[10] = new Array('گنبد ', '3127');
|
1992 |
+
cities[11] = new Array('جورقان ', '3128');
|
1993 |
+
cities[12] = new Array('پادگان قهرمان ', '3129');
|
1994 |
+
cities[13] = new Array('همهکسی ', '2705');
|
1995 |
+
cities[14] = new Array('صالح آباد ', '2706');
|
1996 |
+
cities[15] = new Array('پرلوک ', '2707');
|
1997 |
+
cities[16] = new Array('عاشوری ', '2708');
|
1998 |
+
cities[17] = new Array('مهاجران ', '2709');
|
1999 |
+
cities[18] = new Array('ویرایی ', '2710');
|
2000 |
+
cities[19] = new Array('مریانج ', '2711');
|
2001 |
+
cities[20] = new Array('جنت آباد ', '2712');
|
2002 |
+
cities[21] = new Array('موسی آباد ', '2713');
|
2003 |
+
cities[22] = new Array('چنارسفلی ', '2714');
|
2004 |
+
cities[23] = new Array('چنارعلیا ', '2715');
|
2005 |
+
cities[24] = new Array('اجین ', '2716');
|
2006 |
+
cities[25] = new Array('طویلان سفلا ', '2717');
|
2007 |
+
cities[26] = new Array('کوریجان ', '2718');
|
2008 |
+
cities[27] = new Array('کوهین ', '2719');
|
2009 |
+
cities[28] = new Array('قهوردسفلی ', '2720');
|
2010 |
+
cities[29] = new Array('اکنلو ', '2721');
|
2011 |
+
cities[30] = new Array('شیرین سو ', '2722');
|
2012 |
+
cities[31] = new Array('گل تپه ', '2723');
|
2013 |
+
cities[32] = new Array('داقداق آباد ', '2724');
|
2014 |
+
cities[33] = new Array('قهاوند ', '2725');
|
2015 |
+
cities[34] = new Array('تجرک ', '2726');
|
2016 |
+
cities[35] = new Array('کوزره ', '2727');
|
2017 |
+
cities[36] = new Array('چانگرین ', '2728');
|
2018 |
+
cities[37] = new Array('دمق ', '2729');
|
2019 |
+
cities[38] = new Array('رزن ', '2730');
|
2020 |
+
cities[39] = new Array('قروه درجزین ', '2731');
|
2021 |
+
cities[40] = new Array('ازناو ', '2732');
|
2022 |
+
cities[41] = new Array('جوزان ', '2733');
|
2023 |
+
cities[42] = new Array('زنگنه ', '2734');
|
2024 |
+
cities[43] = new Array('سامن ', '2735');
|
2025 |
+
cities[44] = new Array('اورزمان ', '2736');
|
2026 |
+
cities[45] = new Array('جوکار ', '2737');
|
2027 |
+
cities[46] = new Array('اسلام آباد ', '2738');
|
2028 |
+
cities[47] = new Array('جعفریه ', '2739');
|
2029 |
+
cities[48] = new Array('سرکان ', '2740');
|
2030 |
+
cities[49] = new Array('میانده ', '2741');
|
2031 |
+
cities[50] = new Array('فرسنج ', '2742');
|
2032 |
+
cities[51] = new Array('ولاشجرد ', '2743');
|
2033 |
+
cities[52] = new Array('اشتران ', '2744');
|
2034 |
+
cities[53] = new Array('باباپیر ', '2745');
|
2035 |
+
cities[54] = new Array('جهان آباد ', '2746');
|
2036 |
+
cities[55] = new Array('باباقاسم ', '2747');
|
2037 |
+
cities[56] = new Array('بابارستم ', '2748');
|
2038 |
+
cities[57] = new Array('گیان ', '2749');
|
2039 |
+
cities[58] = new Array('دهفول ', '2750');
|
2040 |
+
cities[59] = new Array('فیروزان ', '2751');
|
2041 |
+
cities[60] = new Array('شهرک صنعتی ', '2752');
|
2042 |
+
cities[61] = new Array('پایگاه نوژه ', '2753');
|
2043 |
+
cities[62] = new Array('علیصدر ', '2754');
|
2044 |
+
cities[63] = new Array('زند ', '2755');
|
2045 |
+
cities[64] = new Array('ازندریان ', '2756');
|
2046 |
+
cities[65] = new Array('خزل ', '2757');
|
2047 |
+
cities[66] = new Array('لالجین ', '4703');
|
2048 |
+
cities[67] = new Array('دینارآباد', '4704');
|
2049 |
+
break;
|
2050 |
+
|
2051 |
+
case 'کردستان':
|
2052 |
+
case 'kurdistan':
|
2053 |
+
case 'kordistan':
|
2054 |
+
case 'kurdestan':
|
2055 |
+
case 'kordestan':
|
2056 |
+
cities[1] = new Array('شویشه ', '5604');
|
2057 |
+
cities[2] = new Array('شاهین ', '3130');
|
2058 |
+
cities[3] = new Array('طای ', '3131');
|
2059 |
+
cities[4] = new Array('گازرخانی ', '3132');
|
2060 |
+
cities[5] = new Array('نشورسفلی ', '3133');
|
2061 |
+
cities[6] = new Array('شیروانه ', '3134');
|
2062 |
+
cities[7] = new Array('خامسان ', '3135');
|
2063 |
+
cities[8] = new Array('موچش ', '3136');
|
2064 |
+
cities[9] = new Array('شریف آباد ', '3137');
|
2065 |
+
cities[10] = new Array('کوله ', '3138');
|
2066 |
+
cities[11] = new Array('هزارکانیان ', '3139');
|
2067 |
+
cities[12] = new Array('زرینه ', '3140');
|
2068 |
+
cities[13] = new Array('گورباباعلی ', '3141');
|
2069 |
+
cities[14] = new Array('گاوشله ', '3142');
|
2070 |
+
cities[15] = new Array('حزکه ', '3143');
|
2071 |
+
cities[16] = new Array('یاسوکند ', '3144');
|
2072 |
+
cities[17] = new Array('توپاغاج ', '3145');
|
2073 |
+
cities[18] = new Array('اغبلاغ طفامین ', '3146');
|
2074 |
+
cities[19] = new Array('باباشارنی ', '3147');
|
2075 |
+
cities[20] = new Array('خسروآباد ', '3148');
|
2076 |
+
cities[21] = new Array('جعفرآباد ', '3149');
|
2077 |
+
cities[22] = new Array('دلبران ', '3150');
|
2078 |
+
cities[23] = new Array('دزج ', '3151');
|
2079 |
+
cities[24] = new Array('کانی گنجی ', '3152');
|
2080 |
+
cities[25] = new Array('بلبان آباد ', '3153');
|
2081 |
+
cities[26] = new Array('دهگلان ', '3154');
|
2082 |
+
cities[27] = new Array('قروچای ', '3155');
|
2083 |
+
cities[28] = new Array('سریش آباد ', '3156');
|
2084 |
+
cities[29] = new Array('نی ', '3157');
|
2085 |
+
cities[30] = new Array('بردهرشه ', '3158');
|
2086 |
+
cities[31] = new Array('چناره ', '3159');
|
2087 |
+
cities[32] = new Array('پیرخفران ', '3160');
|
2088 |
+
cities[33] = new Array('بیساران ', '3161');
|
2089 |
+
cities[34] = new Array('سروآباد ', '3162');
|
2090 |
+
cities[35] = new Array('اورامانتخت ', '3163');
|
2091 |
+
cities[36] = new Array('سرا ', '3164');
|
2092 |
+
cities[37] = new Array('گلتپه ', '3165');
|
2093 |
+
cities[38] = new Array('تیلکو ', '3166');
|
2094 |
+
cities[39] = new Array('صاحب ', '3167');
|
2095 |
+
cities[40] = new Array('خورخوره ', '3168');
|
2096 |
+
cities[41] = new Array('کسنزان ', '3169');
|
2097 |
+
cities[42] = new Array('میرهده ', '3170');
|
2098 |
+
cities[43] = new Array('ننور ', '3171');
|
2099 |
+
cities[44] = new Array('بوئین سفلی ', '3172');
|
2100 |
+
cities[45] = new Array('َآرمرده ', '3173');
|
2101 |
+
cities[46] = new Array('بوالحسن ', '3174');
|
2102 |
+
cities[47] = new Array('کانی سور ', '3175');
|
2103 |
+
cities[48] = new Array('کوخان ', '3176');
|
2104 |
+
cities[49] = new Array('شوی ', '3177');
|
2105 |
+
cities[50] = new Array('کامیاران ', '3095');
|
2106 |
+
cities[51] = new Array('دیواندره ', '3096');
|
2107 |
+
cities[52] = new Array('بیجار ', '3097');
|
2108 |
+
cities[53] = new Array('قروه ', '3098');
|
2109 |
+
cities[54] = new Array('مریوان ', '3099');
|
2110 |
+
cities[55] = new Array('سقز ', '3100');
|
2111 |
+
cities[56] = new Array('بانه ', '3101');
|
2112 |
+
cities[57] = new Array('سنندج', '3541');
|
2113 |
+
break;
|
2114 |
+
|
2115 |
+
case 'کرمانشاه':
|
2116 |
+
case 'kermanshah':
|
2117 |
+
cities[1] = new Array('تازه آباد ـ ثلاث باباجانی ', '4705');
|
2118 |
+
cities[2] = new Array('نسار دیره ', '4706');
|
2119 |
+
cities[3] = new Array('سرمست(گواور) ', '4707');
|
2120 |
+
cities[4] = new Array('تپهرش ', '4708');
|
2121 |
+
cities[5] = new Array('خسروی ', '4709');
|
2122 |
+
cities[6] = new Array('نفت شهر ', '4710');
|
2123 |
+
cities[7] = new Array('سومار ', '4711');
|
2124 |
+
cities[8] = new Array('گیلانغرب ', '4712');
|
2125 |
+
cities[9] = new Array('چله ', '4713');
|
2126 |
+
cities[10] = new Array('قیلان ', '4714');
|
2127 |
+
cities[11] = new Array('باینگان ', '4715');
|
2128 |
+
cities[12] = new Array('نوسود ', '4716');
|
2129 |
+
cities[13] = new Array('نودشه ', '4717');
|
2130 |
+
cities[14] = new Array('روانسر ', '4718');
|
2131 |
+
cities[15] = new Array('دولت آباد ', '4719');
|
2132 |
+
cities[16] = new Array('جوانرود ', '4720');
|
2133 |
+
cities[17] = new Array('میرآباد ', '4721');
|
2134 |
+
cities[18] = new Array('کرمانشاه ', '3542');
|
2135 |
+
cities[19] = new Array('هرسین ', '3102');
|
2136 |
+
cities[20] = new Array('کنگاور ', '3103');
|
2137 |
+
cities[21] = new Array('سنقر ', '3104');
|
2138 |
+
cities[22] = new Array('اسلام آباد غرب ', '3105');
|
2139 |
+
cities[23] = new Array('سرپل ذهاب ', '3106');
|
2140 |
+
cities[24] = new Array('قصرشیرین ', '3107');
|
2141 |
+
cities[25] = new Array('پاوه ', '3108');
|
2142 |
+
cities[26] = new Array('هفت اشیان ', '3178');
|
2143 |
+
cities[27] = new Array('هلشی ', '3179');
|
2144 |
+
cities[28] = new Array('دوردشت ', '3180');
|
2145 |
+
cities[29] = new Array('سنقرآباد ', '3181');
|
2146 |
+
cities[30] = new Array('بیستون ', '3182');
|
2147 |
+
cities[31] = new Array('جعفرآباد(گاکیه) ', '3183');
|
2148 |
+
cities[32] = new Array('مرزبانی ', '3184');
|
2149 |
+
cities[33] = new Array('فش ', '3185');
|
2150 |
+
cities[34] = new Array('فرامان ', '3186');
|
2151 |
+
cities[35] = new Array('سلطان آباد ', '3187');
|
2152 |
+
cities[36] = new Array('صحنه ', '3188');
|
2153 |
+
cities[37] = new Array('قزوینه ', '3189');
|
2154 |
+
cities[38] = new Array('دهلقین ', '3190');
|
2155 |
+
cities[39] = new Array('درکه ', '3191');
|
2156 |
+
cities[40] = new Array('باوله ', '3192');
|
2157 |
+
cities[41] = new Array('گردکانه علیا ', '3193');
|
2158 |
+
cities[42] = new Array('اگاه علیا ', '3194');
|
2159 |
+
cities[43] = new Array('سطر ', '3195');
|
2160 |
+
cities[44] = new Array('کیونان ', '2758');
|
2161 |
+
cities[45] = new Array('کرگسار ', '2759');
|
2162 |
+
cities[46] = new Array('کندوله ', '2760');
|
2163 |
+
cities[47] = new Array('زاوله علیا ', '2761');
|
2164 |
+
cities[48] = new Array('حمیل ', '2762');
|
2165 |
+
cities[49] = new Array('ریجاب ', '2763');
|
2166 |
+
cities[50] = new Array('کرندغرب ـ دالاهو ', '2764');
|
2167 |
+
cities[51] = new Array('گهواره ', '2765');
|
2168 |
+
cities[52] = new Array('کوزران ', '2766');
|
2169 |
+
cities[53] = new Array('قلعه شیان ', '2767');
|
2170 |
+
cities[54] = new Array('سرفیروز آباد ', '2768');
|
2171 |
+
cities[55] = new Array('رباط ', '2769');
|
2172 |
+
cities[56] = new Array('حسن آباد ', '2770');
|
2173 |
+
cities[57] = new Array('سراب ذهاب ', '2771');
|
2174 |
+
cities[58] = new Array('ترک ویس ', '2772');
|
2175 |
+
cities[59] = new Array('ازگله', '2773');
|
2176 |
+
break;
|
2177 |
+
|
2178 |
+
case 'لرستان':
|
2179 |
+
case 'lorestan':
|
2180 |
+
cities[1] = new Array('نورآباد ـ دلفان ', '3109');
|
2181 |
+
cities[2] = new Array('کوهدشت ', '3110');
|
2182 |
+
cities[3] = new Array('پل دختر ', '3111');
|
2183 |
+
cities[4] = new Array('الیگودرز ', '3112');
|
2184 |
+
cities[5] = new Array('ازنا ', '3113');
|
2185 |
+
cities[6] = new Array('دورود ', '3114');
|
2186 |
+
cities[7] = new Array('الشتر ـ سلسله ', '3115');
|
2187 |
+
cities[8] = new Array('خرم آباد ', '3543');
|
2188 |
+
cities[9] = new Array('بروجرد ', '3544');
|
2189 |
+
cities[10] = new Array('ماسور ', '4722');
|
2190 |
+
cities[11] = new Array('چغلوندی ', '4723');
|
2191 |
+
cities[12] = new Array('برخوردار ', '4724');
|
2192 |
+
cities[13] = new Array('فرهادآباد ', '4725');
|
2193 |
+
cities[14] = new Array('دمباغ ', '4726');
|
2194 |
+
cities[15] = new Array('کهریزوروشت ', '4727');
|
2195 |
+
cities[16] = new Array('چشمه کوزان ', '4728');
|
2196 |
+
cities[17] = new Array('هفت چشمه ', '4729');
|
2197 |
+
cities[18] = new Array('تقی آباد ', '4730');
|
2198 |
+
cities[19] = new Array('خوشناموند ', '4731');
|
2199 |
+
cities[20] = new Array('اشتره گل گل ', '4732');
|
2200 |
+
cities[21] = new Array('چقابل ', '4733');
|
2201 |
+
cities[22] = new Array('سوری ', '4734');
|
2202 |
+
cities[23] = new Array('کونانی ', '4735');
|
2203 |
+
cities[24] = new Array('گراب ', '4736');
|
2204 |
+
cities[25] = new Array('درب گنبد ', '4737');
|
2205 |
+
cities[26] = new Array('پاعلم ', '4738');
|
2206 |
+
cities[27] = new Array('واشیان نصیرتپه ', '4739');
|
2207 |
+
cities[28] = new Array('چشمک زیرتنگ ', '4740');
|
2208 |
+
cities[29] = new Array('افرینه ', '4741');
|
2209 |
+
cities[30] = new Array('معمولان ', '4742');
|
2210 |
+
cities[31] = new Array('میان راهان ', '4743');
|
2211 |
+
cities[32] = new Array('شوراب سفلی ', '4744');
|
2212 |
+
cities[33] = new Array('شاهپورآباد ', '4745');
|
2213 |
+
cities[34] = new Array('چمن سلطان ', '4746');
|
2214 |
+
cities[35] = new Array('کیزاندره ', '4747');
|
2215 |
+
cities[36] = new Array('بزنوید ', '4748');
|
2216 |
+
cities[37] = new Array('شول آباد ', '4749');
|
2217 |
+
cities[38] = new Array('حیه ', '4750');
|
2218 |
+
cities[39] = new Array('مرگسر ', '4751');
|
2219 |
+
cities[40] = new Array('مومن آباد ', '4752');
|
2220 |
+
cities[41] = new Array('رازان ', '4753');
|
2221 |
+
cities[42] = new Array('سیاه گوشی ', '4754');
|
2222 |
+
cities[43] = new Array('زاغه ', '4755');
|
2223 |
+
cities[44] = new Array('سراب دوره ', '4756');
|
2224 |
+
cities[45] = new Array('چاه ذوالفقار ', '4757');
|
2225 |
+
cities[46] = new Array('چمپلک ', '4758');
|
2226 |
+
cities[47] = new Array('ژان ', '4759');
|
2227 |
+
cities[48] = new Array('کاغه شمالی ', '4760');
|
2228 |
+
cities[49] = new Array('چالان چولان ', '4761');
|
2229 |
+
cities[50] = new Array('سپیددشت ', '4762');
|
2230 |
+
cities[51] = new Array('چمسنگر ', '4763');
|
2231 |
+
cities[52] = new Array('تنگ هفت ', '4764');
|
2232 |
+
cities[53] = new Array('حکومتی ', '4765');
|
2233 |
+
cities[54] = new Array('سیاهپوش ', '4766');
|
2234 |
+
cities[55] = new Array('ده رحیم ', '4767');
|
2235 |
+
cities[56] = new Array('فیروزآباد ', '4768');
|
2236 |
+
cities[57] = new Array('اشترینان ', '4769');
|
2237 |
+
cities[58] = new Array('بندیزه ', '4770');
|
2238 |
+
cities[59] = new Array('دره گرگ', '4771');
|
2239 |
+
break;
|
2240 |
+
|
2241 |
+
case 'بوشهر':
|
2242 |
+
case 'bushehr':
|
2243 |
+
cities[1] = new Array('بوشهر ', '3547');
|
2244 |
+
cities[2] = new Array('بندرگناوه ', '3721');
|
2245 |
+
cities[3] = new Array('خورموج ـ دشتی ', '3722');
|
2246 |
+
cities[4] = new Array('اهرم ـ تنگستان ', '3723');
|
2247 |
+
cities[5] = new Array('برازجان ـ دشتستان ', '3724');
|
2248 |
+
cities[6] = new Array('نخل تقی ', '3725');
|
2249 |
+
cities[7] = new Array('عالی شهر ', '4886');
|
2250 |
+
cities[8] = new Array('بندرریگ ', '4887');
|
2251 |
+
cities[9] = new Array('چهارروستائی ', '4888');
|
2252 |
+
cities[10] = new Array('شول ', '4889');
|
2253 |
+
cities[11] = new Array('بندردیلم ', '4890');
|
2254 |
+
cities[12] = new Array('امام حسن ', '4891');
|
2255 |
+
cities[13] = new Array('چغارک ', '4892');
|
2256 |
+
cities[14] = new Array('عسلویه ', '4893');
|
2257 |
+
cities[15] = new Array('بادوله ', '4894');
|
2258 |
+
cities[16] = new Array('شنبه ', '4895');
|
2259 |
+
cities[17] = new Array('کاکی ', '4896');
|
2260 |
+
cities[18] = new Array('جزیره خارک ', '4897');
|
2261 |
+
cities[19] = new Array('دلوار ', '4898');
|
2262 |
+
cities[20] = new Array('بنهگز ', '4899');
|
2263 |
+
cities[21] = new Array('آباد ', '4900');
|
2264 |
+
cities[22] = new Array('بردخون ', '4901');
|
2265 |
+
cities[23] = new Array('بندردیر ', '4902');
|
2266 |
+
cities[24] = new Array('ابدان ', '4903');
|
2267 |
+
cities[25] = new Array('ریز ', '4904');
|
2268 |
+
cities[26] = new Array('بندرکنگان ', '4905');
|
2269 |
+
cities[27] = new Array('جم ', '4906');
|
2270 |
+
cities[28] = new Array('آبگرم ', '4907');
|
2271 |
+
cities[29] = new Array('دالکی ', '4908');
|
2272 |
+
cities[30] = new Array('شبانکاره ', '4909');
|
2273 |
+
cities[31] = new Array('آبپخش ', '4910');
|
2274 |
+
cities[32] = new Array('سعدآباد ', '4911');
|
2275 |
+
cities[33] = new Array('وحدتیه ', '4912');
|
2276 |
+
cities[34] = new Array('تنگ ارم ', '4913');
|
2277 |
+
cities[35] = new Array('کلمه ', '4914');
|
2278 |
+
cities[36] = new Array('سیراف', '5620');
|
2279 |
+
break;
|
2280 |
+
|
2281 |
+
case 'کرمان':
|
2282 |
+
case 'kerman':
|
2283 |
+
cities[1] = new Array('کرمان ', '3548');
|
2284 |
+
cities[2] = new Array('رفسنجان ', '3549');
|
2285 |
+
cities[3] = new Array('سیرجان ', '3550');
|
2286 |
+
cities[4] = new Array('ماهان ', '3729');
|
2287 |
+
cities[5] = new Array('گلباف ', '3730');
|
2288 |
+
cities[6] = new Array('راور ', '3731');
|
2289 |
+
cities[7] = new Array('بم ', '3732');
|
2290 |
+
cities[8] = new Array('بروات ', '3733');
|
2291 |
+
cities[9] = new Array('راین ', '3734');
|
2292 |
+
cities[10] = new Array('محمدآباد ـ ریگان ', '3735');
|
2293 |
+
cities[11] = new Array('سرچشمه ', '3736');
|
2294 |
+
cities[12] = new Array('انار ', '3737');
|
2295 |
+
cities[13] = new Array('شهربابک ', '3738');
|
2296 |
+
cities[14] = new Array('زرند ', '3739');
|
2297 |
+
cities[15] = new Array('کیان شهر ', '3740');
|
2298 |
+
cities[16] = new Array('کوهبنان ', '3741');
|
2299 |
+
cities[17] = new Array('چترود ', '3742');
|
2300 |
+
cities[18] = new Array('پاریز ', '3743');
|
2301 |
+
cities[19] = new Array('بردسیر ', '3744');
|
2302 |
+
cities[20] = new Array('بافت ', '3745');
|
2303 |
+
cities[21] = new Array('جیرفت ', '3746');
|
2304 |
+
cities[22] = new Array('عنبرآباد ', '3747');
|
2305 |
+
cities[23] = new Array('کهنوج ', '3748');
|
2306 |
+
cities[24] = new Array('منوجان ', '3749');
|
2307 |
+
cities[25] = new Array('محی آباد ', '5605');
|
2308 |
+
cities[26] = new Array('ده بالا ', '4936');
|
2309 |
+
cities[27] = new Array('حسین آبادخان ', '4937');
|
2310 |
+
cities[28] = new Array('جوپار ', '4938');
|
2311 |
+
cities[29] = new Array('باغین ', '4939');
|
2312 |
+
cities[30] = new Array('اختیارآباد ', '4940');
|
2313 |
+
cities[31] = new Array('زنگی آباد ', '4941');
|
2314 |
+
cities[32] = new Array('جوشان ', '4942');
|
2315 |
+
cities[33] = new Array('سیرچ ', '4943');
|
2316 |
+
cities[34] = new Array('اندوهجرد ', '4944');
|
2317 |
+
cities[35] = new Array('شهداد ', '4945');
|
2318 |
+
cities[36] = new Array('کشیت ', '4946');
|
2319 |
+
cities[37] = new Array('همت آباد ', '4947');
|
2320 |
+
cities[38] = new Array('باغهوتک ', '4948');
|
2321 |
+
cities[39] = new Array('خورند ', '4949');
|
2322 |
+
cities[40] = new Array('فیض آباد ', '4950');
|
2323 |
+
cities[41] = new Array('دریجان ', '4951');
|
2324 |
+
cities[42] = new Array('نرماشیر ', '4952');
|
2325 |
+
cities[43] = new Array('فهرج ', '4953');
|
2326 |
+
cities[44] = new Array('دهنوگنیگی ', '4954');
|
2327 |
+
cities[45] = new Array('برج معاذ ', '4955');
|
2328 |
+
cities[46] = new Array('قلعه خان ', '4956');
|
2329 |
+
cities[47] = new Array('نظام شهر ', '4957');
|
2330 |
+
cities[48] = new Array('خانه خاتون ', '4958');
|
2331 |
+
cities[49] = new Array('ابارق ', '4959');
|
2332 |
+
cities[50] = new Array('عبدالصمدیه ', '4960');
|
2333 |
+
cities[51] = new Array('گروه ', '4961');
|
2334 |
+
cities[52] = new Array('گزک ', '4962');
|
2335 |
+
cities[53] = new Array('حسین آباد ', '4963');
|
2336 |
+
cities[54] = new Array('دهنه عباسی ', '4964');
|
2337 |
+
cities[55] = new Array('تهرود ', '4965');
|
2338 |
+
cities[56] = new Array('میرآباد ', '4966');
|
2339 |
+
cities[57] = new Array('داوران ', '4967');
|
2340 |
+
cities[58] = new Array('خنامان ', '4968');
|
2341 |
+
cities[59] = new Array('کبوترخان ', '4969');
|
2342 |
+
cities[60] = new Array('هرمزآباد ', '4970');
|
2343 |
+
cities[61] = new Array('کشکوئیه ', '4971');
|
2344 |
+
cities[62] = new Array('گلشن ', '4972');
|
2345 |
+
cities[63] = new Array('فردوسیه ', '4973');
|
2346 |
+
cities[64] = new Array('بهجت آباد ', '4974');
|
2347 |
+
cities[65] = new Array('بهرمان ', '4975');
|
2348 |
+
cities[66] = new Array('جوادیه فلاح ', '4976');
|
2349 |
+
cities[67] = new Array('میمند ', '4977');
|
2350 |
+
cities[68] = new Array('برفه ', '4978');
|
2351 |
+
cities[69] = new Array('خورسند ', '4979');
|
2352 |
+
cities[70] = new Array('خبر ', '4980');
|
2353 |
+
cities[71] = new Array('کهرخ ', '4981');
|
2354 |
+
cities[72] = new Array('جوزم ', '4982');
|
2355 |
+
cities[73] = new Array('دهج ', '4983');
|
2356 |
+
cities[74] = new Array('دشتخاک ', '4984');
|
2357 |
+
cities[75] = new Array('برفوئیه ', '4985');
|
2358 |
+
cities[76] = new Array('حتکن ', '4986');
|
2359 |
+
cities[77] = new Array('ریحان ', '4987');
|
2360 |
+
cities[78] = new Array('جرجافک ', '4988');
|
2361 |
+
cities[79] = new Array('حصین ', '4989');
|
2362 |
+
cities[80] = new Array('یزدانشهر ', '4990');
|
2363 |
+
cities[81] = new Array('شعبجره ', '4991');
|
2364 |
+
cities[82] = new Array('ناچو ', '4992');
|
2365 |
+
cities[83] = new Array('سریز ', '4993');
|
2366 |
+
cities[84] = new Array('خانوک ', '4994');
|
2367 |
+
cities[85] = new Array('علی آبادسفلی ', '4995');
|
2368 |
+
cities[86] = new Array('جور ', '4996');
|
2369 |
+
cities[87] = new Array('هوتک ', '4997');
|
2370 |
+
cities[88] = new Array('کهنوج( مغزآباد) ', '4998');
|
2371 |
+
cities[89] = new Array('کاظم آباد ', '4999');
|
2372 |
+
cities[90] = new Array('هجدک ', '5000');
|
2373 |
+
cities[91] = new Array('حرجند ', '5001');
|
2374 |
+
cities[92] = new Array('نجف شهر ', '5002');
|
2375 |
+
cities[93] = new Array('بلورد ', '5003');
|
2376 |
+
cities[94] = new Array('ملک اباد ', '5004');
|
2377 |
+
cities[95] = new Array('حاجی آبادرضوان ', '5005');
|
2378 |
+
cities[96] = new Array('عمادآباد ', '5006');
|
2379 |
+
cities[97] = new Array('زیدآباد ', '5007');
|
2380 |
+
cities[98] = new Array('سعادت آباد ', '5008');
|
2381 |
+
cities[99] = new Array('دولت ابادتنگوئیه ', '5009');
|
2382 |
+
cities[100] = new Array('نگار ', '5010');
|
2383 |
+
cities[101] = new Array('گلزار ', '5011');
|
2384 |
+
cities[102] = new Array('لاله زار ', '5012');
|
2385 |
+
cities[103] = new Array('قلعه عسگر ', '5013');
|
2386 |
+
cities[104] = new Array('مومن آباد ', '5014');
|
2387 |
+
cities[105] = new Array('برین ', '5015');
|
2388 |
+
cities[106] = new Array('کمال آباد ', '5016');
|
2389 |
+
cities[107] = new Array('امیرآباد ', '5017');
|
2390 |
+
cities[108] = new Array('بزنجان ', '5018');
|
2391 |
+
cities[109] = new Array('رابر ', '5019');
|
2392 |
+
cities[110] = new Array('دهسرد(پتکان) ', '5020');
|
2393 |
+
cities[111] = new Array('ارزوئیه ', '5021');
|
2394 |
+
cities[112] = new Array('جبالبارز ', '5022');
|
2395 |
+
cities[113] = new Array('دولت اباداسفن ', '5023');
|
2396 |
+
cities[114] = new Array('بهرآسمان ', '5024');
|
2397 |
+
cities[115] = new Array('درب بهشت ', '5025');
|
2398 |
+
cities[116] = new Array('دولت ابادسکوچ ', '5026');
|
2399 |
+
cities[117] = new Array('گور ', '5027');
|
2400 |
+
cities[118] = new Array('رضی آباد ', '5028');
|
2401 |
+
cities[119] = new Array('هیحان علیا ', '5029');
|
2402 |
+
cities[120] = new Array('دهانه گمرکان ', '5030');
|
2403 |
+
cities[121] = new Array('قلعه گنج ', '5031');
|
2404 |
+
cities[122] = new Array('مردهک ', '5032');
|
2405 |
+
cities[123] = new Array('دوساری ', '5033');
|
2406 |
+
cities[124] = new Array('حسین آبادجدید ', '5034');
|
2407 |
+
cities[125] = new Array('بلوک ', '5035');
|
2408 |
+
cities[126] = new Array('رودبار ', '5036');
|
2409 |
+
cities[127] = new Array('نودژ ', '5037');
|
2410 |
+
cities[128] = new Array('فاریاب ', '5038');
|
2411 |
+
cities[129] = new Array('کیورآباد ', '5039');
|
2412 |
+
cities[130] = new Array('رائین قلعه ', '5040');
|
2413 |
+
cities[131] = new Array('سرخ قلعه ', '5041');
|
2414 |
+
cities[132] = new Array('رمشک ', '5042');
|
2415 |
+
cities[133] = new Array('حیدرآباد ', '5043');
|
2416 |
+
cities[134] = new Array('خیرآباد', '5044');
|
2417 |
+
break;
|
2418 |
+
|
2419 |
+
case 'هرمزگان':
|
2420 |
+
case 'hormozgān':
|
2421 |
+
case 'hormozgan':
|
2422 |
+
cities[1] = new Array('بندرخمیر ', '3750');
|
2423 |
+
cities[2] = new Array('کیش ', '3751');
|
2424 |
+
cities[3] = new Array('قشم ', '3752');
|
2425 |
+
cities[4] = new Array('بستک ', '3753');
|
2426 |
+
cities[5] = new Array('بندر لنگه ', '3754');
|
2427 |
+
cities[6] = new Array('میناب ', '3755');
|
2428 |
+
cities[7] = new Array('دهبارز ـ رودان ', '3756');
|
2429 |
+
cities[8] = new Array('ایسین ', '5045');
|
2430 |
+
cities[9] = new Array('پل شرقی ', '5046');
|
2431 |
+
cities[10] = new Array('فین ', '5047');
|
2432 |
+
cities[11] = new Array('سیاهو ', '5048');
|
2433 |
+
cities[12] = new Array('فارغان ', '5049');
|
2434 |
+
cities[13] = new Array('باغات ', '5050');
|
2435 |
+
cities[14] = new Array('حاجی آباد ', '5051');
|
2436 |
+
cities[15] = new Array('خورگو ', '5052');
|
2437 |
+
cities[16] = new Array('شمیل ', '5053');
|
2438 |
+
cities[17] = new Array('حسن لنگی ', '5054');
|
2439 |
+
cities[18] = new Array('سیریک ', '5055');
|
2440 |
+
cities[19] = new Array('گونمردی ', '5056');
|
2441 |
+
cities[20] = new Array('گروک سفلی ', '5057');
|
2442 |
+
cities[21] = new Array('گوهرت ', '5058');
|
2443 |
+
cities[22] = new Array('درگهان ', '5059');
|
2444 |
+
cities[23] = new Array('سوزا ', '5060');
|
2445 |
+
cities[24] = new Array('هرمز ', '5061');
|
2446 |
+
cities[25] = new Array('جزیرهلارک ', '5062');
|
2447 |
+
cities[26] = new Array('جزیره هنگام ', '5063');
|
2448 |
+
cities[27] = new Array('جزیره سیری ', '5064');
|
2449 |
+
cities[28] = new Array('ابوموسی ', '5065');
|
2450 |
+
cities[29] = new Array('پدل ', '5066');
|
2451 |
+
cities[30] = new Array('کنگ ', '5067');
|
2452 |
+
cities[31] = new Array('دژگان ', '5068');
|
2453 |
+
cities[32] = new Array('رویدر ', '5069');
|
2454 |
+
cities[33] = new Array('دهنگ ', '5070');
|
2455 |
+
cities[34] = new Array('جناح ', '5071');
|
2456 |
+
cities[35] = new Array('کمشک ', '5072');
|
2457 |
+
cities[36] = new Array('گزیر ', '5073');
|
2458 |
+
cities[37] = new Array('مغویه ', '5074');
|
2459 |
+
cities[38] = new Array('چارک ', '5075');
|
2460 |
+
cities[39] = new Array('دشتی ', '5076');
|
2461 |
+
cities[40] = new Array('پارسیان ', '5077');
|
2462 |
+
cities[41] = new Array('جزیره لاوان ', '5078');
|
2463 |
+
cities[42] = new Array('جاسک ', '5079');
|
2464 |
+
cities[43] = new Array('بندر ', '5080');
|
2465 |
+
cities[44] = new Array('سندرک ', '5081');
|
2466 |
+
cities[45] = new Array('درپهن ', '5082');
|
2467 |
+
cities[46] = new Array('جگدان ', '5083');
|
2468 |
+
cities[47] = new Array('گوهران ', '5084');
|
2469 |
+
cities[48] = new Array('سردشت ـ بشاگرد ', '5085');
|
2470 |
+
cities[49] = new Array('گرهون ', '5506');
|
2471 |
+
cities[50] = new Array('جغین ', '5507');
|
2472 |
+
cities[51] = new Array('زیارت علی ', '5508');
|
2473 |
+
cities[52] = new Array('ماشنگی ', '5509');
|
2474 |
+
cities[53] = new Array('گوربند ', '5510');
|
2475 |
+
cities[54] = new Array('تیاب ', '5511');
|
2476 |
+
cities[55] = new Array('بندزک کهنه ', '5512');
|
2477 |
+
cities[56] = new Array('هشتبندی ', '5513');
|
2478 |
+
cities[57] = new Array('بندرعباس', '3551');
|
2479 |
+
break;
|
2480 |
+
|
2481 |
+
case 'چهارمحال و بختیاری':
|
2482 |
+
case 'chahar mahaal and bakhtiari':
|
2483 |
+
cities[1] = new Array('فرخ شهر ', '2996');
|
2484 |
+
cities[2] = new Array('دزک ', '2997');
|
2485 |
+
cities[3] = new Array('هفشجان ', '2998');
|
2486 |
+
cities[4] = new Array('هارونی ', '2999');
|
2487 |
+
cities[5] = new Array('سامان ', '3000');
|
2488 |
+
cities[6] = new Array('فارسان ', '3001');
|
2489 |
+
cities[7] = new Array('بروجن ', '3002');
|
2490 |
+
cities[8] = new Array('اردل ', '3003');
|
2491 |
+
cities[9] = new Array('لردگان ', '3004');
|
2492 |
+
cities[10] = new Array('شهرکرد ', '3557');
|
2493 |
+
cities[11] = new Array('کیان ', '5219');
|
2494 |
+
cities[12] = new Array('طاقانک ', '5220');
|
2495 |
+
cities[13] = new Array('خراجی ', '5221');
|
2496 |
+
cities[14] = new Array('دستنائ ', '5222');
|
2497 |
+
cities[15] = new Array('شلمزار ـ کیار ', '5223');
|
2498 |
+
cities[16] = new Array('گهرو ', '5224');
|
2499 |
+
cities[17] = new Array('سورشجان ', '5225');
|
2500 |
+
cities[18] = new Array('مرغملک ', '5226');
|
2501 |
+
cities[19] = new Array('سودجان ', '5227');
|
2502 |
+
cities[20] = new Array('چالشتر ', '5228');
|
2503 |
+
cities[21] = new Array('شورآب صغیر ', '5229');
|
2504 |
+
cities[22] = new Array('هوره ', '5230');
|
2505 |
+
cities[23] = new Array('مارکده ', '5231');
|
2506 |
+
cities[24] = new Array('نافچ ', '5232');
|
2507 |
+
cities[25] = new Array('وردنجان ', '5233');
|
2508 |
+
cities[26] = new Array('بن ', '5234');
|
2509 |
+
cities[27] = new Array('بردنجان ', '5235');
|
2510 |
+
cities[28] = new Array('باباحیدر ', '5236');
|
2511 |
+
cities[29] = new Array('میهه ', '5237');
|
2512 |
+
cities[30] = new Array('چلگرد ـ کوهرنگ ', '5238');
|
2513 |
+
cities[31] = new Array('شهریاری ', '5239');
|
2514 |
+
cities[32] = new Array('جونقان ', '5240');
|
2515 |
+
cities[33] = new Array('صمصامی ', '5241');
|
2516 |
+
cities[34] = new Array('تلورد ', '5242');
|
2517 |
+
cities[35] = new Array('نقنه ', '5243');
|
2518 |
+
cities[36] = new Array('فرادنبه ', '5244');
|
2519 |
+
cities[37] = new Array('سفیددشت ', '5245');
|
2520 |
+
cities[38] = new Array('بلداجی ', '5246');
|
2521 |
+
cities[39] = new Array('اورگان ', '5247');
|
2522 |
+
cities[40] = new Array('گندمان ', '5248');
|
2523 |
+
cities[41] = new Array('امام قیس ', '5249');
|
2524 |
+
cities[42] = new Array('ناغان ', '5250');
|
2525 |
+
cities[43] = new Array('دوپلان ', '5251');
|
2526 |
+
cities[44] = new Array('دورک ', '5252');
|
2527 |
+
cities[45] = new Array('سرخون ', '5253');
|
2528 |
+
cities[46] = new Array('عزیزآباد ', '5254');
|
2529 |
+
cities[47] = new Array('دشتک ', '5255');
|
2530 |
+
cities[48] = new Array('سرمور ', '5256');
|
2531 |
+
cities[49] = new Array('ارمندعلیا ', '5257');
|
2532 |
+
cities[50] = new Array('آلونی ', '5258');
|
2533 |
+
cities[51] = new Array('مال خلیفه ', '5259');
|
2534 |
+
cities[52] = new Array('چمنبید ', '5260');
|
2535 |
+
cities[53] = new Array('سردشت ', '5261');
|
2536 |
+
cities[54] = new Array('گرگر ', '5262');
|
2537 |
+
cities[55] = new Array('منجبرآفتاب', '5263');
|
2538 |
+
break;
|
2539 |
+
|
2540 |
+
case 'یزد':
|
2541 |
+
case 'yazd':
|
2542 |
+
cities[1] = new Array('حمیدیا ', '5610');
|
2543 |
+
cities[2] = new Array('فراغه ', '5264');
|
2544 |
+
cities[3] = new Array('تیرجرد ', '5265');
|
2545 |
+
cities[4] = new Array('مهردشت ', '5266');
|
2546 |
+
cities[5] = new Array('اسفندآباد ', '5267');
|
2547 |
+
cities[6] = new Array('شاهدیه ', '5268');
|
2548 |
+
cities[7] = new Array('فهرج ', '5269');
|
2549 |
+
cities[8] = new Array('رستاق ', '5270');
|
2550 |
+
cities[9] = new Array('فجر ', '5271');
|
2551 |
+
cities[10] = new Array('ندوشن ', '5272');
|
2552 |
+
cities[11] = new Array('احمدآباد ', '5273');
|
2553 |
+
cities[12] = new Array('عقدائ ', '5274');
|
2554 |
+
cities[13] = new Array('نارستان ', '5275');
|
2555 |
+
cities[14] = new Array('زرین ', '5276');
|
2556 |
+
cities[15] = new Array('رباطات ', '5277');
|
2557 |
+
cities[16] = new Array('بفروئیه ', '5278');
|
2558 |
+
cities[17] = new Array('شهیدیه ', '5279');
|
2559 |
+
cities[18] = new Array('اسفیچ ', '5280');
|
2560 |
+
cities[19] = new Array('سبزدشت ', '5281');
|
2561 |
+
cities[20] = new Array('مبارکه ', '5282');
|
2562 |
+
cities[21] = new Array('بهاباد ', '5283');
|
2563 |
+
cities[22] = new Array('کوشک ', '5284');
|
2564 |
+
cities[23] = new Array('بنتان ', '5285');
|
2565 |
+
cities[24] = new Array('جلگه ', '5286');
|
2566 |
+
cities[25] = new Array('تنگ چنار ', '5287');
|
2567 |
+
cities[26] = new Array('میانکوه ', '5288');
|
2568 |
+
cities[27] = new Array('ارنان ', '5289');
|
2569 |
+
cities[28] = new Array('بهادران ', '5290');
|
2570 |
+
cities[29] = new Array('مروست ', '5291');
|
2571 |
+
cities[30] = new Array('فتح آباد ', '5292');
|
2572 |
+
cities[31] = new Array('پیشکوه ', '5293');
|
2573 |
+
cities[32] = new Array('نصرآباد ', '5294');
|
2574 |
+
cities[33] = new Array('علی آباد ', '5295');
|
2575 |
+
cities[34] = new Array('نیر ', '5296');
|
2576 |
+
cities[35] = new Array('شیرکوه ', '5297');
|
2577 |
+
cities[36] = new Array('بخگاریزات ', '5298');
|
2578 |
+
cities[37] = new Array('دهشیر ', '5299');
|
2579 |
+
cities[38] = new Array('محمد آباد ', '5300');
|
2580 |
+
cities[39] = new Array('خضر آباد ', '5301');
|
2581 |
+
cities[40] = new Array('رباط پشت بادام ', '5302');
|
2582 |
+
cities[41] = new Array('خرانق ', '5303');
|
2583 |
+
cities[42] = new Array('ساغند ', '5304');
|
2584 |
+
cities[43] = new Array('زارچ ', '5305');
|
2585 |
+
cities[44] = new Array('مهدی آباد ', '5306');
|
2586 |
+
cities[45] = new Array('احمدآبادمشیر ', '5307');
|
2587 |
+
cities[46] = new Array('شرب العین ', '5308');
|
2588 |
+
cities[47] = new Array('قوام آباد ', '5309');
|
2589 |
+
cities[48] = new Array('خویدک ', '5310');
|
2590 |
+
cities[49] = new Array('هرات ـ خاتم ', '5311');
|
2591 |
+
cities[50] = new Array('یزد ', '3558');
|
2592 |
+
cities[51] = new Array('اشکذر ـ صدوق ', '3007');
|
2593 |
+
cities[52] = new Array('اردکان ', '3008');
|
2594 |
+
cities[53] = new Array('میبد ', '3009');
|
2595 |
+
cities[54] = new Array('بافق ', '3010');
|
2596 |
+
cities[55] = new Array('مهریز ', '3011');
|
2597 |
+
cities[56] = new Array('تفت ', '3012');
|
2598 |
+
cities[57] = new Array('ابرکوه', '3005');
|
2599 |
+
break;
|
2600 |
+
|
2601 |
+
case 'سیستان و بلوچستان':
|
2602 |
+
case 'sistan and baluchistan':
|
2603 |
+
case 'sistan and baluchestan':
|
2604 |
+
cities[1] = new Array('نصرت آباد ', '3046');
|
2605 |
+
cities[2] = new Array('حاجی آباد ', '3047');
|
2606 |
+
cities[3] = new Array('میرجاوه ', '3048');
|
2607 |
+
cities[4] = new Array('دوست محمد ـ هیرمند ', '3049');
|
2608 |
+
cities[5] = new Array('زابل ', '3050');
|
2609 |
+
cities[6] = new Array('زهک ', '3051');
|
2610 |
+
cities[7] = new Array('خواجه احمد ', '3052');
|
2611 |
+
cities[8] = new Array('خاش ', '3053');
|
2612 |
+
cities[9] = new Array('سرباز ', '3054');
|
2613 |
+
cities[10] = new Array('بمپور ', '3055');
|
2614 |
+
cities[11] = new Array('سراوان ', '3056');
|
2615 |
+
cities[12] = new Array('سوران ـ سیب سوران ', '3782');
|
2616 |
+
cities[13] = new Array('چابهار ', '3783');
|
2617 |
+
cities[14] = new Array('کنارک ', '3784');
|
2618 |
+
cities[15] = new Array('نیک شهر ', '3785');
|
2619 |
+
cities[16] = new Array('زاهدان ', '3564');
|
2620 |
+
cities[17] = new Array('ایرانشهر ', '3565');
|
2621 |
+
cities[18] = new Array('نوک اباد ', '5412');
|
2622 |
+
cities[19] = new Array('حرمک ', '5413');
|
2623 |
+
cities[20] = new Array('پاسگاه تلسیاه ', '5414');
|
2624 |
+
cities[21] = new Array('محمدابادکورین ', '5415');
|
2625 |
+
cities[22] = new Array('گلوگاه ', '5416');
|
2626 |
+
cities[23] = new Array('گردجنگل ', '5417');
|
2627 |
+
cities[24] = new Array('میل هفتادودو ', '5418');
|
2628 |
+
cities[25] = new Array('انده ', '5419');
|
2629 |
+
cities[26] = new Array('تیمن ', '5420');
|
2630 |
+
cities[27] = new Array('لادیزعلیا ', '5421');
|
2631 |
+
cities[28] = new Array('کچهرود ', '5422');
|
2632 |
+
cities[29] = new Array('دیزوک ', '5423');
|
2633 |
+
cities[30] = new Array('قنات عیسی اباد ', '5424');
|
2634 |
+
cities[31] = new Array('سیادک ', '5425');
|
2635 |
+
cities[32] = new Array('خمک ', '5426');
|
2636 |
+
cities[33] = new Array('تحت عدالت ', '5427');
|
2637 |
+
cities[34] = new Array('برج میرگل ', '5428');
|
2638 |
+
cities[35] = new Array('جهان ابادعلیا ', '5429');
|
2639 |
+
cities[36] = new Array('پکک ', '5430');
|
2640 |
+
cities[37] = new Array('جانی اباد ', '5431');
|
2641 |
+
cities[38] = new Array('ادیمی ', '5432');
|
2642 |
+
cities[39] = new Array('تیموراباد ', '5433');
|
2643 |
+
cities[40] = new Array('دولت اباد ', '5434');
|
2644 |
+
cities[41] = new Array('لوتک ', '5435');
|
2645 |
+
cities[42] = new Array('سکوهه ', '5436');
|
2646 |
+
cities[43] = new Array('محمدآباد ', '5437');
|
2647 |
+
cities[44] = new Array('بنجار ', '5438');
|
2648 |
+
cities[45] = new Array('جزینک ', '5439');
|
2649 |
+
cities[46] = new Array('قلعه نو ', '5440');
|
2650 |
+
cities[47] = new Array('محمد شاهکرم ', '5441');
|
2651 |
+
cities[48] = new Array('سیاهسر ', '5442');
|
2652 |
+
cities[49] = new Array('ژالهای ', '5443');
|
2653 |
+
cities[50] = new Array('کرباسک ', '5444');
|
2654 |
+
cities[51] = new Array('نوراباد ', '5445');
|
2655 |
+
cities[52] = new Array('کارواندر ', '5446');
|
2656 |
+
cities[53] = new Array('ناصراباد ', '5447');
|
2657 |
+
cities[54] = new Array('بالاقلعه ایردگان ', '5448');
|
2658 |
+
cities[55] = new Array('کمن ', '5449');
|
2659 |
+
cities[56] = new Array('زیرگلدان ', '5450');
|
2660 |
+
cities[57] = new Array('بیت اباد ', '5451');
|
2661 |
+
cities[58] = new Array('گوهرکوه ', '5452');
|
2662 |
+
cities[59] = new Array('دهپابید ', '5453');
|
2663 |
+
cities[60] = new Array('ناذیل ', '5454');
|
2664 |
+
cities[61] = new Array('گوشه ', '5455');
|
2665 |
+
cities[62] = new Array('سنگان ', '5456');
|
2666 |
+
cities[63] = new Array('عشق آباد ', '5457');
|
2667 |
+
cities[64] = new Array('افضل اباد ', '5458');
|
2668 |
+
cities[65] = new Array('چانف ', '5459');
|
2669 |
+
cities[66] = new Array('اسماعیل کلک ', '5460');
|
2670 |
+
cities[67] = new Array('پارود ', '5461');
|
2671 |
+
cities[68] = new Array('راسک ', '5462');
|
2672 |
+
cities[69] = new Array('پیشین ', '5463');
|
2673 |
+
cities[70] = new Array('ایرفشان ', '5464');
|
2674 |
+
cities[71] = new Array('سرداب ', '5465');
|
2675 |
+
cities[72] = new Array('اسپکه ', '5466');
|
2676 |
+
cities[73] = new Array('پیپ ', '5467');
|
2677 |
+
cities[74] = new Array('بنت ', '5468');
|
2678 |
+
cities[75] = new Array('فنوج ', '5469');
|
2679 |
+
cities[76] = new Array('گلمورتی ـ دلگان ', '5470');
|
2680 |
+
cities[77] = new Array('هودیان ', '5471');
|
2681 |
+
cities[78] = new Array('بزمان ', '5472');
|
2682 |
+
cities[79] = new Array('کوشکوک ناهوک ', '5473');
|
2683 |
+
cities[80] = new Array('محمدی ', '5474');
|
2684 |
+
cities[81] = new Array('کلهگان(سردک) ', '5475');
|
2685 |
+
cities[82] = new Array('جالق ', '5476');
|
2686 |
+
cities[83] = new Array('سیرکان ', '5477');
|
2687 |
+
cities[84] = new Array('اسفندک ', '5478');
|
2688 |
+
cities[85] = new Array('کوهک ', '5479');
|
2689 |
+
cities[86] = new Array('گشت ', '5480');
|
2690 |
+
cities[87] = new Array('پسکو ', '5481');
|
2691 |
+
cities[88] = new Array('رگنتگ ', '5482');
|
2692 |
+
cities[89] = new Array('زابلی ', '5483');
|
2693 |
+
cities[90] = new Array('هیدوچ ', '5484');
|
2694 |
+
cities[91] = new Array('طیس ', '5485');
|
2695 |
+
cities[92] = new Array('تلنگ ', '5486');
|
2696 |
+
cities[93] = new Array('پلان ', '5487');
|
2697 |
+
cities[94] = new Array('نگور ', '5488');
|
2698 |
+
cities[95] = new Array('باهوکلات ', '5489');
|
2699 |
+
cities[96] = new Array('پسابندر ', '5490');
|
2700 |
+
cities[97] = new Array('پیرسهراب ', '5491');
|
2701 |
+
cities[98] = new Array('پایگاه کنارک ', '5492');
|
2702 |
+
cities[99] = new Array('کهیر هوتان ', '5493');
|
2703 |
+
cities[100] = new Array('شهدای کهیر ', '5494');
|
2704 |
+
cities[101] = new Array('زراباد ', '5495');
|
2705 |
+
cities[102] = new Array('مسکوتان ', '5496');
|
2706 |
+
cities[103] = new Array('کیتج ', '5497');
|
2707 |
+
cities[104] = new Array('دستگرد ', '5498');
|
2708 |
+
cities[105] = new Array('محنت ', '5499');
|
2709 |
+
cities[106] = new Array('چاهان ', '5500');
|
2710 |
+
cities[107] = new Array('هیمان ', '5501');
|
2711 |
+
cities[108] = new Array('قصرقند ', '5502');
|
2712 |
+
cities[109] = new Array('شگیم بالا ', '5503');
|
2713 |
+
cities[110] = new Array('کشیک ', '5504');
|
2714 |
+
cities[111] = new Array('ساربوک', '5505');
|
2715 |
+
break;
|
2716 |
+
|
2717 |
+
case 'ایلام':
|
2718 |
+
case 'ilam':
|
2719 |
+
cities[1] = new Array('باکلکراب ', '4772');
|
2720 |
+
cities[2] = new Array('جعفرآباد ', '4773');
|
2721 |
+
cities[3] = new Array('شهرک شهید کشوری ', '4774');
|
2722 |
+
cities[4] = new Array('چوار ', '4775');
|
2723 |
+
cities[5] = new Array('حاجی بختیار ', '4776');
|
2724 |
+
cities[6] = new Array('چمن سیدمحمد ', '4777');
|
2725 |
+
cities[7] = new Array('شورابه ملک ', '4778');
|
2726 |
+
cities[8] = new Array('کلان ', '4779');
|
2727 |
+
cities[9] = new Array('زرنه ', '4780');
|
2728 |
+
cities[10] = new Array('توحید ', '4781');
|
2729 |
+
cities[11] = new Array('بلاوهتره سفلی ', '4782');
|
2730 |
+
cities[12] = new Array('لومار ', '4783');
|
2731 |
+
cities[13] = new Array('آسمان آباد ', '4784');
|
2732 |
+
cities[14] = new Array('قنات آباد ', '4785');
|
2733 |
+
cities[15] = new Array('شهرک سرنیک ', '4786');
|
2734 |
+
cities[16] = new Array('پیازآباد ', '4787');
|
2735 |
+
cities[17] = new Array('ایرج آباد ', '4788');
|
2736 |
+
cities[18] = new Array('ارمو ', '4789');
|
2737 |
+
cities[19] = new Array('چشمه شیرین ', '4790');
|
2738 |
+
cities[20] = new Array('بدره ', '4791');
|
2739 |
+
cities[21] = new Array('شهرک ولی عصر ', '4792');
|
2740 |
+
cities[22] = new Array('انجیرهنیشه کبد ', '4793');
|
2741 |
+
cities[23] = new Array('سراب باغ ', '4794');
|
2742 |
+
cities[24] = new Array('مورموری ', '4795');
|
2743 |
+
cities[25] = new Array('چمهندی ', '4796');
|
2744 |
+
cities[26] = new Array('موسیان ', '4797');
|
2745 |
+
cities[27] = new Array('بردی ', '4798');
|
2746 |
+
cities[28] = new Array('میمه ', '4799');
|
2747 |
+
cities[29] = new Array('پهله ', '4800');
|
2748 |
+
cities[30] = new Array('عین خوش ', '4801');
|
2749 |
+
cities[31] = new Array('دشت عباس ', '4802');
|
2750 |
+
cities[32] = new Array('شهرک اسلامیه ', '4803');
|
2751 |
+
cities[33] = new Array('صالح آباد ', '4804');
|
2752 |
+
cities[34] = new Array('ارکواز ', '4805');
|
2753 |
+
cities[35] = new Array('دولکبودخوشادل ', '4806');
|
2754 |
+
cities[36] = new Array('یاریاب ', '4807');
|
2755 |
+
cities[37] = new Array('ایلام ', '3116');
|
2756 |
+
cities[38] = new Array('ایوان ', '3117');
|
2757 |
+
cities[39] = new Array('سرابله ـ شیروان و چرداول ', '3118');
|
2758 |
+
cities[40] = new Array('دره شهر ', '3119');
|
2759 |
+
cities[41] = new Array('آبدانان ', '3120');
|
2760 |
+
cities[42] = new Array('دهلران ', '3121');
|
2761 |
+
cities[43] = new Array('مهران', '3122');
|
2762 |
+
break;
|
2763 |
+
|
2764 |
+
case 'کهگیلویه و بویراحمد':
|
2765 |
+
case 'kohgiluyeh and boyer-ahmad':
|
2766 |
+
case 'kohgiluyeh and boyerahmad':
|
2767 |
+
cities[1] = new Array('دهدشت ', '3726');
|
2768 |
+
cities[2] = new Array('دوگنبد ', '3727');
|
2769 |
+
cities[3] = new Array('یاسوج ', '3728');
|
2770 |
+
cities[4] = new Array('سوق ', '4915');
|
2771 |
+
cities[5] = new Array('لنده ', '4916');
|
2772 |
+
cities[6] = new Array('لیکک ', '4917');
|
2773 |
+
cities[7] = new Array('چرام ', '4918');
|
2774 |
+
cities[8] = new Array('دیشموک ', '4919');
|
2775 |
+
cities[9] = new Array('قلعه رئیسی ', '4920');
|
2776 |
+
cities[10] = new Array('قلعه دختر ', '4921');
|
2777 |
+
cities[11] = new Array('باباکلان ', '4922');
|
2778 |
+
cities[12] = new Array('مظفرآباد ', '4923');
|
2779 |
+
cities[13] = new Array('دیل ', '4924');
|
2780 |
+
cities[14] = new Array('شاه بهرام ', '4925');
|
2781 |
+
cities[15] = new Array('چاه تلخاب علیا ', '4926');
|
2782 |
+
cities[16] = new Array('باشت ', '4927');
|
2783 |
+
cities[17] = new Array('سربیشه ', '4928');
|
2784 |
+
cities[18] = new Array('سپیدار ', '4929');
|
2785 |
+
cities[19] = new Array('نقارخانه ', '4930');
|
2786 |
+
cities[20] = new Array('گراب سفلی ', '4931');
|
2787 |
+
cities[21] = new Array('موشمی علیا ', '4932');
|
2788 |
+
cities[22] = new Array('میمند ', '4933');
|
2789 |
+
cities[23] = new Array('مارگون ', '4934');
|
2790 |
+
cities[24] = new Array('سیسخت ', '4935');
|
2791 |
+
cities[25] = new Array('مادوان', '5606');
|
2792 |
+
break;
|
2793 |
+
|
2794 |
+
case 'خراسان شمالی':
|
2795 |
+
case 'khorasan - north':
|
2796 |
+
case 'khorasan-north':
|
2797 |
+
cities[1] = new Array('حصار گرمخانه ', '5343');
|
2798 |
+
cities[2] = new Array('فاروج ', '5324');
|
2799 |
+
cities[3] = new Array('بجنورد ', '3560');
|
2800 |
+
cities[4] = new Array('جاجرم ', '2880');
|
2801 |
+
cities[5] = new Array('قاضی ', '2824');
|
2802 |
+
cities[6] = new Array('پیش قلعه ', '2830');
|
2803 |
+
cities[7] = new Array('راز ', '2831');
|
2804 |
+
cities[8] = new Array('سنخواست ', '2826');
|
2805 |
+
cities[9] = new Array('شیروان ', '2834');
|
2806 |
+
cities[10] = new Array('صفی آباد ', '2895');
|
2807 |
+
cities[11] = new Array('اسفراین ', '2892');
|
2808 |
+
cities[12] = new Array('گرمه ', '3023');
|
2809 |
+
cities[13] = new Array('آشخانه ـ مانه و سلمقان ', '3014');
|
2810 |
+
cities[14] = new Array('شوقان ', '3015');
|
2811 |
+
cities[15] = new Array('درق ', '3016');
|
2812 |
+
cities[16] = new Array('لوجلی', '3017');
|
2813 |
+
break;
|
2814 |
+
|
2815 |
+
case 'خراسان جنوبی':
|
2816 |
+
case 'khorasan - south':
|
2817 |
+
case 'khorasan-south':
|
2818 |
+
cities[1] = new Array('سه قلعه ', '5402');
|
2819 |
+
cities[2] = new Array('قهستان ', '5592');
|
2820 |
+
cities[3] = new Array('اسلامیه ', '5593');
|
2821 |
+
cities[4] = new Array('زهان ', '5391');
|
2822 |
+
cities[5] = new Array('خوسف ', '5367');
|
2823 |
+
cities[6] = new Array('حاجی آباد ', '5373');
|
2824 |
+
cities[7] = new Array('نیمبلوک ', '5374');
|
2825 |
+
cities[8] = new Array('آیسک ', '5375');
|
2826 |
+
cities[9] = new Array('اسدیه ـ درمیان ', '5376');
|
2827 |
+
cities[10] = new Array('شوسف ', '5383');
|
2828 |
+
cities[11] = new Array('خضری ', '5389');
|
2829 |
+
cities[12] = new Array('سرایان ', '5394');
|
2830 |
+
cities[13] = new Array('بیرجند ', '3563');
|
2831 |
+
cities[14] = new Array('دشت بیاض ', '2815');
|
2832 |
+
cities[15] = new Array('اسفدن ', '2833');
|
2833 |
+
cities[16] = new Array('آرین شهر ', '2891');
|
2834 |
+
cities[17] = new Array('طبس ', '3006');
|
2835 |
+
cities[18] = new Array('مود ', '3040');
|
2836 |
+
cities[19] = new Array('سر بیشه ', '3041');
|
2837 |
+
cities[20] = new Array('نهبندان ', '3042');
|
2838 |
+
cities[21] = new Array('قائن ـ قائنات ', '3043');
|
2839 |
+
cities[22] = new Array('فردوس ', '3044');
|
2840 |
+
cities[23] = new Array('بشرویه', '3045');
|
2841 |
+
break;
|
2842 |
+
|
2843 |
+
case 'البرز':
|
2844 |
+
case 'alborz':
|
2845 |
+
cities[1] = new Array('کرج ', '3351');
|
2846 |
+
cities[2] = new Array('اشتهارد ', '3821');
|
2847 |
+
cities[3] = new Array('گلسار ', '3850');
|
2848 |
+
cities[4] = new Array('نظرآباد ', '3587');
|
2849 |
+
cities[5] = new Array('هشتگرد ـ ساوجبلاغ ', '3591');
|
2850 |
+
cities[14] = new Array('شهر جدید هشتگرد', '5618');
|
2851 |
+
cities[6] = new Array('رباط کریم ', '3620');
|
2852 |
+
cities[7] = new Array('مشکین شهر ', '5611');
|
2853 |
+
cities[8] = new Array('محمدشهر ', '5612');
|
2854 |
+
cities[9] = new Array('ماهیدشت ', '5613');
|
2855 |
+
cities[10] = new Array('کمال شهر ', '5614');
|
2856 |
+
cities[11] = new Array('صفادشت ', '5615');
|
2857 |
+
cities[12] = new Array('فردوسیه ', '5616');
|
2858 |
+
cities[13] = new Array('چهارباغ ', '5617');
|
2859 |
+
break;
|
2860 |
+
|
2861 |
+
default:
|
2862 |
+
cities[0] = new Array(' ', '0');
|
2863 |
+
break;
|
2864 |
+
}
|
2865 |
+
|
2866 |
+
var options = "";
|
2867 |
+
|
2868 |
+
var x;
|
2869 |
+
for (x in cities) {
|
2870 |
+
options += "<option>"+ cities[x][0] +"</option>";
|
2871 |
+
}
|
2872 |
+
|
2873 |
+
return options;
|
2874 |
+
}
|
assets/js/iran-cities.min.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
function gform_iranCities(r){var a={};switch(r.toLowerCase()){case"تهران":case"tehran":a[1]=new Array("شهر قدس ","3619"),a[2]=new Array("پردیس ","5588"),a[3]=new Array("نسیم شهر ","5589"),a[4]=new Array("گلستان ","5590"),a[5]=new Array("قرچک ","5591"),a[6]=new Array("دماوند ","3633"),a[7]=new Array("فیروزکوه ","3634"),a[8]=new Array("ورامین ","3592"),a[9]=new Array("پیشوا ","3593"),a[10]=new Array("جاجرود ","3594"),a[11]=new Array("لواسان ","3588"),a[12]=new Array("شهریار ","3589"),a[13]=new Array("فردوس ","3590"),a[15]=new Array("تجزیه مبادلات لشکر ","3578"),a[23]=new Array("ری ","3586"),a[24]=new Array("برغان ","3851"),a[25]=new Array("رامجین ","3852"),a[26]=new Array("کوهسار ","3853"),a[27]=new Array("شهراسر ","3854"),a[28]=new Array("منگلان ","3855"),a[29]=new Array("طالقان ","3856"),a[30]=new Array("قلعه سین ","3857"),a[31]=new Array("خیرآبادخالصه ","3858"),a[32]=new Array("عسگرآبادعباسی ","3859"),a[33]=new Array("دهماسین ","3860"),a[34]=new Array("باغ خواص ","3861"),a[35]=new Array("ایجدان ","3862"),a[36]=new Array("آب باریک ","3863"),a[37]=new Array("جواد آباد ","3864"),a[38]=new Array("خاوه ","3865"),a[39]=new Array("محمودآبادعرب ","3866"),a[40]=new Array("جلیل آباد ","3867"),a[41]=new Array("کریم آباد ","3868"),a[42]=new Array("قلعه خواجه ","3869"),a[43]=new Array("داودآباد ","3870"),a[44]=new Array("پاکدشت ","3871"),a[45]=new Array("شریف آباد ","3872"),a[46]=new Array("پارچین ","3873"),a[47]=new Array("حصارامیر ","3874"),a[48]=new Array("خاتون آباد ","3875"),a[49]=new Array("آتشگاه ","3822"),a[50]=new Array("احمدآبادمستوفی ","3823"),a[51]=new Array("اسلام شهر ","3824"),a[52]=new Array("مروزبهرام ","3825"),a[53]=new Array("گلدسته ","3826"),a[54]=new Array("صالح آباد ","3827"),a[55]=new Array("واوان ","3828"),a[56]=new Array("شاتره ","3829"),a[57]=new Array("میان آباد ","3830"),a[58]=new Array("چهاردانگه ","3831"),a[59]=new Array("فخرایران ","3832"),a[60]=new Array("احمدآبادمصدق ","3833"),a[61]=new Array("نجم آباد ","3834"),a[62]=new Array("تنگمان ","3835"),a[63]=new Array("سعیدآباد ","3836"),a[64]=new Array("هیو ","3837"),a[65]=new Array("حومه گلندوک ","3838"),a[66]=new Array("اوشان ","3839"),a[67]=new Array("میگون ","3840"),a[68]=new Array("فشم ","3841"),a[69]=new Array("لوسان بزرگ ","3842"),a[70]=new Array("شهریاربردآباد ","3843"),a[71]=new Array("قاسم آبادقندیشاد ","3844"),a[72]=new Array("باغستان ","3845"),a[73]=new Array("شهرآباد ","3846"),a[74]=new Array("شاهدشهر ","3847"),a[75]=new Array("ملارد ","3848"),a[76]=new Array("لم آباد ","3849"),a[77]=new Array("خسروآباد ","3786"),a[78]=new Array("بومهن ","3787"),a[79]=new Array("شهرجدیدپردیس ","3788"),a[80]=new Array("خرمدشت ","3789"),a[81]=new Array("باقر شهر ","3790"),a[82]=new Array("جعفرآباد ","3791"),a[83]=new Array("مرقدامام ","3792"),a[84]=new Array("کهریزک ","3793"),a[85]=new Array("تورقوزآباد ","3794"),a[86]=new Array("شورآباد ","3795"),a[87]=new Array("قمصر ","3796"),a[88]=new Array("حسن آباد ","3797"),a[89]=new Array("شمس آباد ","3798"),a[90]=new Array("ابراهیم آباد ","3799"),a[91]=new Array("چرمسازی سالاریه ","3800"),a[92]=new Array("قلعه محمدعلیخان ","3801"),a[93]=new Array("فرودگاه امام خمینی ","3802"),a[94]=new Array("وهن آباد ","3803"),a[95]=new Array("قلعه نوخالصه ","3804"),a[96]=new Array("گل تپه کبیر ","3805"),a[97]=new Array("محمودآبادپیرزاد ","3806"),a[98]=new Array("فرون آباد ","3807"),a[99]=new Array("خاورشهر ","3808"),a[100]=new Array("اسلام آباد ","3809"),a[101]=new Array("لپهزنگ ","3810"),a[102]=new Array("قیام دشت ","3811"),a[103]=new Array("قرچحصار ","3812"),a[104]=new Array("خلاریز ","3813"),a[105]=new Array("سوهانک ","3814"),a[106]=new Array("پس قلعه ","3815"),a[107]=new Array("درکه ","3816"),a[108]=new Array("ادران ","3817"),a[109]=new Array("آسارا ","3818"),a[110]=new Array("نساء ","3819"),a[111]=new Array("پلنگ آباد ","3820"),a[112]=new Array("شهرقدس(مویز) ","4003"),a[113]=new Array("اندیشه ","4004"),a[114]=new Array("مارلیک ","4005"),a[115]=new Array("نصیرآباد ","4006"),a[116]=new Array("رزگان ","4007"),a[117]=new Array("گلمه ","4008"),a[118]=new Array("پرند ","4009"),a[119]=new Array("سلطان آباد ","4010"),a[120]=new Array("گلستان ","4011"),a[121]=new Array("اسماعیل آباد ","4012"),a[122]=new Array("اکبرآباد ","4013"),a[123]=new Array("نصیرآبادقاجار ","4014"),a[124]=new Array("منجیل آباد ","4015"),a[125]=new Array("جابان ","4109"),a[126]=new Array("رودهن ","4110"),a[127]=new Array("گیلاوند ","4111"),a[128]=new Array("آبعلی ","4112"),a[129]=new Array("کیلان ","4113"),a[130]=new Array("آبسرد ","4114"),a[131]=new Array("سربندان ","4115"),a[132]=new Array("مشاء ","4116"),a[133]=new Array("مراء ","4117"),a[134]=new Array("هرانده ","4118"),a[135]=new Array("درده ","4119"),a[136]=new Array("حصارین ","4120"),a[137]=new Array("ارجمند ","4121"),a[138]=new Array("امیریه ","4122"),a[139]=new Array("گرمدره ","4123"),a[140]=new Array("تهران","3322");break;case"گیلان":case"guilan":case"gilan":a[1]=new Array("رودبنه ","5607"),a[2]=new Array("آبکنار ","3636"),a[3]=new Array("خمام ","3637"),a[4]=new Array("فومن ","3638"),a[5]=new Array("صومعه سرا ","3639"),a[6]=new Array("هشتپر ـ طوالش ","3640"),a[7]=new Array("ماسال ","3641"),a[8]=new Array("آستارا ","3642"),a[9]=new Array("سیاهکل ","3643"),a[10]=new Array("آستانه اشرفیه ","3644"),a[11]=new Array("منجیل ","3645"),a[12]=new Array("رودبار ","3646"),a[13]=new Array("لنگرود ","3647"),a[14]=new Array("رودسر ","3648"),a[15]=new Array("کلاچای ","3649"),a[16]=new Array("کپورچال ","4124"),a[17]=new Array("جیرهنده لشت نشا ","4125"),a[18]=new Array("لیجارکی ","4126"),a[19]=new Array("سنگر ","4127"),a[20]=new Array("اسلام آباد ","4128"),a[21]=new Array("سراوان ","4129"),a[22]=new Array("خشک بیجار ","4130"),a[23]=new Array("لشت نشا ","4131"),a[24]=new Array("پیربست لولمان ","4132"),a[25]=new Array("خاچکین ","4133"),a[26]=new Array("کوچصفهان ","4134"),a[27]=new Array("بلسبنه ","4135"),a[28]=new Array("چاپارخانه ","4136"),a[29]=new Array("جیرکویه ","4137"),a[30]=new Array("لولمان ","4138"),a[31]=new Array("شفت ","4139"),a[32]=new Array("ملاسرا ","4140"),a[33]=new Array("چوبر ","4141"),a[34]=new Array("ماسوله ","4142"),a[35]=new Array("گشت ","4143"),a[36]=new Array("احمد سرگوراب ","4144"),a[37]=new Array("مرجقل ","4145"),a[38]=new Array("گورابزرمیخ ","4146"),a[39]=new Array("طاهر گوداب ","4147"),a[40]=new Array("ضیابر ","4148"),a[41]=new Array("مرکیه ","4149"),a[42]=new Array("هنده خاله ","4150"),a[43]=new Array("نوخاله اکبر ","4151"),a[44]=new Array("بازاراسالم ","4152"),a[45]=new Array("شیلهوشت ","4153"),a[46]=new Array("جوکندان ","4154"),a[47]=new Array("لیسار ","4155"),a[48]=new Array("خطبه سرا ","4156"),a[49]=new Array("حویق ","4157"),a[50]=new Array("پلاسی ","4158"),a[51]=new Array("ویسادار ","4159"),a[52]=new Array("رضوان شهر ","4160"),a[53]=new Array("شاندرمن ","4161"),a[54]=new Array("پرهسر ","4162"),a[55]=new Array("پلنک پاره ","4163"),a[56]=new Array("بازارجمعه شاندرمن ","4164"),a[57]=new Array("اسالم ","4165"),a[58]=new Array("شیخ محله ","4166"),a[59]=new Array("ویرمونی ","4167"),a[60]=new Array("سیبلی ","4168"),a[61]=new Array("لوندویل ","4169"),a[62]=new Array("شند ","4170"),a[63]=new Array("کوتهکومه ","4171"),a[64]=new Array("حیران علیا ","4172"),a[65]=new Array("پاشاکی ","4173"),a[66]=new Array("گرماور ","4174"),a[67]=new Array("لیش ","4175"),a[68]=new Array("بادکوسرا ","4176"),a[69]=new Array("شیرین نسائ ","4177"),a[70]=new Array("خرارود ","4178"),a[71]=new Array("دیلمان ","4179"),a[72]=new Array("لسکوکلایه ","4180"),a[73]=new Array("کیسم ","4181"),a[74]=new Array("شیرکوه چهارده ","4182"),a[75]=new Array("دهشال ","4183"),a[76]=new Array("کیاشهر ","4184"),a[77]=new Array("دستک ","4185"),a[78]=new Array("پرگاپشت مهدیقانی ","4186"),a[79]=new Array("لوشان ","4187"),a[80]=new Array("بیورزین ","4188"),a[81]=new Array("جیرنده ","4189"),a[82]=new Array("برهسر ","4190"),a[83]=new Array("ویشان ","4191"),a[84]=new Array("کلیشم ","4192"),a[85]=new Array("علی آباد کلشتر ","4193"),a[86]=new Array("رستم آباد ","4194"),a[87]=new Array("توتکابن ","4195"),a[88]=new Array("کلشتر ","4196"),a[89]=new Array("جوین ","4197"),a[90]=new Array("اسکلک ","4198"),a[91]=new Array("کوکنه ","4199"),a[92]=new Array("سلوش ","4200"),a[93]=new Array("چمخاله ","4201"),a[94]=new Array("شلمان ","4202"),a[95]=new Array("کومله ","4203"),a[96]=new Array("دیوشل ","4204"),a[97]=new Array("پروش پایین ","4205"),a[98]=new Array("اطاقور ","4206"),a[99]=new Array("قاسم آبادسفلی ","4207"),a[100]=new Array("حسن سرا ","4208"),a[101]=new Array("طوللات ","4209"),a[102]=new Array("رانکوه ","4210"),a[103]=new Array("چابکسر ","4211"),a[104]=new Array("جنگسرا ","4212"),a[105]=new Array("واجارگاه ","4213"),a[106]=new Array("رحیم آباد ","4214"),a[107]=new Array("بلترک ","4215"),a[108]=new Array("املش ","4216"),a[109]=new Array("پائین زربیجار ","4217"),a[110]=new Array("کجیر ","4218"),a[111]=new Array("گرمابدست ","4219"),a[112]=new Array("شوئیل ","4220"),a[113]=new Array("پونل ","4221"),a[114]=new Array("بندرانزلی ","3519"),a[115]=new Array("لاهیجان ","3520"),a[116]=new Array("رشت","3361");break;case"آذربایجان شرقی":case"azarbaijan - east":case"azarbaijan-east":a[1]=new Array("تبریز ","3366"),a[2]=new Array("میانه ","3527"),a[3]=new Array("مرند ","3528"),a[4]=new Array("مراغه ","3529"),a[5]=new Array("سبلان ","3682"),a[6]=new Array("شهر جدید سهند ","3683"),a[7]=new Array("اسکو ","3684"),a[8]=new Array("سردرود ","3685"),a[9]=new Array("آذرشهر ","3686"),a[10]=new Array("شبستر ","3687"),a[11]=new Array("هریس ","3688"),a[12]=new Array("هادیشهر ","3689"),a[13]=new Array("جلفا ","3690"),a[14]=new Array("اهر ","3691"),a[15]=new Array("کلیبر ","3692"),a[16]=new Array("سراب ","3693"),a[17]=new Array("بستان آباد ","3694"),a[18]=new Array("عجب شیر ","3695"),a[19]=new Array("بناب ","3696"),a[20]=new Array("ملکان ","3697"),a[21]=new Array("قره اغاج ـ چاراویماق ","3698"),a[22]=new Array("اغچه ریش ","3699"),a[23]=new Array("ترک ","4383"),a[24]=new Array("ترکمانچای ","4384"),a[25]=new Array("خاتون آباد ","4385"),a[26]=new Array("شیخدرآباد ","4386"),a[27]=new Array("قره بلاغ ","4387"),a[28]=new Array("آق کند ","4388"),a[29]=new Array("اچاچی ","4389"),a[30]=new Array("گوندوغدی ","4390"),a[31]=new Array("پورسخلو ","4391"),a[32]=new Array("کنگاور ","4392"),a[33]=new Array("قویوجاق ","4393"),a[34]=new Array("ارموداق ","4394"),a[35]=new Array("کهنمو ","4395"),a[36]=new Array("اربط ","4396"),a[37]=new Array("خسروشهر ","4397"),a[38]=new Array("لاهیجان ","4398"),a[39]=new Array("خاصبان ","4399"),a[40]=new Array("ایلخچی ","4400"),a[41]=new Array("سرایده ","4401"),a[42]=new Array("کجاآباد ","4402"),a[43]=new Array("خلجان ","4403"),a[44]=new Array("ینگی اسپران ","4404"),a[45]=new Array("باسمنج ","4405"),a[46]=new Array("شادبادمشایخ ","4406"),a[47]=new Array("کندرود ","4407"),a[48]=new Array("مایان سفلی ","4408"),a[49]=new Array("تیمورلو ","4409"),a[50]=new Array("قدمگاه ","4410"),a[51]=new Array("ممقان ","4411"),a[52]=new Array("گوگان ","4412"),a[53]=new Array("شیرامین ","4413"),a[54]=new Array("هفت چشمه ","4414"),a[55]=new Array("امند ","4415"),a[56]=new Array("خامنه ","4416"),a[57]=new Array("سیس ","4417"),a[58]=new Array("صوفیان ","4418"),a[59]=new Array("شندآباد ","4419"),a[60]=new Array("تسوج ","4420"),a[61]=new Array("شرفخانه ","4421"),a[62]=new Array("مینق ","4422"),a[63]=new Array("بخشایش ـ کلوانق ","4423"),a[64]=new Array("سرند ","4424"),a[65]=new Array("زرنق ","4425"),a[66]=new Array("بیلوردی ","4426"),a[67]=new Array("خواجه ","4427"),a[68]=new Array("گلین قیه ","4428"),a[69]=new Array("هرزندجدید ","4429"),a[70]=new Array("بناب جدید ـ مرند ","4430"),a[71]=new Array("زنوز ","4431"),a[72]=new Array("دولت آباد ","4432"),a[73]=new Array("یکان کهریز ","4433"),a[74]=new Array("یامچی ","4434"),a[75]=new Array("شجاع ","4435"),a[76]=new Array("داران ","4436"),a[77]=new Array("سیهرود ","4437"),a[78]=new Array("نوجهمهر ","4438"),a[79]=new Array("کشک سرای ","4439"),a[80]=new Array("خاروانا ","4440"),a[81]=new Array("هوراند ","4441"),a[82]=new Array("چولقشلاقی ","4442"),a[83]=new Array("ورگهان ","4443"),a[84]=new Array("افیل ","4444"),a[85]=new Array("اذغان ","4445"),a[86]=new Array("سیهکلان ","4446"),a[87]=new Array("ورزقان ","4447"),a[88]=new Array("اقبراز ","4448"),a[89]=new Array("مولان ","4449"),a[90]=new Array("خمارلو ","4450"),a[91]=new Array("عاشقلو ","4451"),a[92]=new Array("اسکلو ","4452"),a[93]=new Array("ابشاحمد ","4453"),a[94]=new Array("یوزبند ","4454"),a[95]=new Array("کاغذکنان ","4455"),a[96]=new Array("خداآفرین ","4456"),a[97]=new Array("کندوان ","4457"),a[98]=new Array("تیل ","4458"),a[99]=new Array("وایقان ","4459"),a[100]=new Array("لاریجان ","4460"),a[101]=new Array("اسب فروشان ","4461"),a[102]=new Array("ابرغان ","4462"),a[103]=new Array("شربیان ","4463"),a[104]=new Array("مهربان ","4464"),a[105]=new Array("رازلیق ","4465"),a[106]=new Array("اغمیون ","4466"),a[107]=new Array("اردها ","4467"),a[108]=new Array("قرهچای حاجعلی ","4468"),a[109]=new Array("قره بابا ","4469"),a[110]=new Array("سعیدآباد ","4470"),a[111]=new Array("الانق ","4471"),a[112]=new Array("کردکندی ","4472"),a[113]=new Array("قرهچمن ","4473"),a[114]=new Array("ورجوی ","4474"),a[115]=new Array("گلتپه ","4475"),a[116]=new Array("خراجو ","4476"),a[117]=new Array("داشاتان ","4477"),a[118]=new Array("داش بلاغ بازار ","4478"),a[119]=new Array("صومعه ","4479"),a[120]=new Array("علویان ","4480"),a[121]=new Array("شیراز ","4481"),a[122]=new Array("خضرلو ","4482"),a[123]=new Array("یگنجه ","4483"),a[124]=new Array("مهماندار ","4484"),a[125]=new Array("خانیان ","4485"),a[126]=new Array("دانالو ","4486"),a[127]=new Array("رحمانلو ","4487"),a[128]=new Array("زاوشت ","4488"),a[129]=new Array("القو ","4489"),a[130]=new Array("روشت بزرگ ","4490"),a[131]=new Array("خوشه مهر ","4491"),a[132]=new Array("زوارق ","4492"),a[133]=new Array("خانه برق ","4493"),a[134]=new Array("لکلر ","4494"),a[135]=new Array("بایقوت ","4495"),a[136]=new Array("اروق ","4496"),a[137]=new Array("اقمنار ","4497"),a[138]=new Array("لیلان ","4498"),a[139]=new Array("طوراغائی ","4499"),a[140]=new Array("هشترود ","4500"),a[141]=new Array("اوشندل ","4501"),a[142]=new Array("علی آبادعلیا ","4502"),a[143]=new Array("ذوالبین ","4503"),a[144]=new Array("نظرکهریزی ","4504"),a[145]=new Array("آتش بیگ ","4505"),a[146]=new Array("سلوک ","4506"),a[147]=new Array("نصیرآبادسفلی ","4507"),a[148]=new Array("ارسگنای سفلی ","4508"),a[149]=new Array("سلطان آباد ","4509"),a[150]=new Array("قله حسین خان ","4510"),a[151]=new Array("ذاکر کندی ","4511"),a[152]=new Array("قوچ احمد ","4512"),a[153]=new Array("اغزیارت ","4513"),a[154]=new Array("تیکمه داش","5576");break;case"خوزستان":case"khuzestan":a[1]=new Array("اهواز ","3374"),a[2]=new Array("آبادان ","3538"),a[3]=new Array("خرمشهر ","3539"),a[4]=new Array("اروندکنار ","3075"),a[5]=new Array("ملاثانی ","3076"),a[6]=new Array("ماهشهر ","3077"),a[7]=new Array("آغاجاری ","3078"),a[8]=new Array("رامهرمز ","3079"),a[9]=new Array("ایذه ","3080"),a[10]=new Array("شادگان ","3081"),a[11]=new Array("سوسنگرد ـ دشت آزادگان ","3082"),a[12]=new Array("شوشتر ","3083"),a[13]=new Array("دزفول ","3084"),a[14]=new Array("شوش ","3085"),a[15]=new Array("اندیمشک ","3086"),a[16]=new Array("مسجد سلیمان ","3087"),a[17]=new Array("شیبان ","5597"),a[18]=new Array("ویس ","5598"),a[19]=new Array("زهره ","5599"),a[20]=new Array("شرافت ","5600"),a[21]=new Array("سالند ","5601"),a[22]=new Array("فیاضی ","4614"),a[23]=new Array("تنگه یک ","4615"),a[24]=new Array("چویبده ","4616"),a[25]=new Array("نهر سلیم ","4617"),a[26]=new Array("فرخپیـسعدونی ","4618"),a[27]=new Array("ابطر ","4619"),a[28]=new Array("عیندو ","4620"),a[29]=new Array("حمیدیه ","4621"),a[30]=new Array("امالطیر ","4622"),a[31]=new Array("خزامی ","4623"),a[32]=new Array("قلعه چنعال ","4624"),a[33]=new Array("کریت برومی ","4625"),a[34]=new Array("نحیزانیه ","4626"),a[35]=new Array("چمکلگه ","4627"),a[36]=new Array("چمران ـ شهرک طالقانی ","4628"),a[37]=new Array("بندر امام خمینی ","4629"),a[38]=new Array("بندرامام خمینی ","4630"),a[39]=new Array("صالح شهر ","4631"),a[40]=new Array("اسیاب ","4632"),a[41]=new Array("هندیجان ","4633"),a[42]=new Array("بهبهان ","4634"),a[43]=new Array("گروه پدافندهوائی ","4635"),a[44]=new Array("ده ابراهیم ","4636"),a[45]=new Array("کردستان بزرگ ","4637"),a[46]=new Array("منصوریه ","4638"),a[47]=new Array("سردشت ","4639"),a[48]=new Array("امیدیه ","4640"),a[49]=new Array("میانکوه ","4641"),a[50]=new Array("رودزردماشین ","4642"),a[51]=new Array("کیم ","4643"),a[52]=new Array("نفت سفید ","4644"),a[53]=new Array("رمیله علیا ","4645"),a[54]=new Array("رامشیر ","4646"),a[55]=new Array("جایزان ","4647"),a[56]=new Array("دره تونمنمی ","4648"),a[57]=new Array("نورآباد ","4649"),a[58]=new Array("صیدون ","4650"),a[59]=new Array("باغ ملک ","4651"),a[60]=new Array("قلعه تل ","4652"),a[61]=new Array("چنارستان ","4653"),a[62]=new Array("پشت پیان ","4654"),a[63]=new Array("دهدز ","4655"),a[64]=new Array("عبودی ","4656"),a[65]=new Array("دارخوین ","4657"),a[66]=new Array("درویشی ","4658"),a[67]=new Array("بوزیسیف ","4659"),a[68]=new Array("مینوشهر ","4660"),a[69]=new Array("حفارشرقی ","4661"),a[70]=new Array("مقاومت ","4662"),a[71]=new Array("برویهیک ","4663"),a[72]=new Array("ابوحمیظه ","4664"),a[73]=new Array("هویزه ","4665"),a[74]=new Array("یزدنو ","4666"),a[75]=new Array("رفیع ","4667"),a[76]=new Array("بستان ","4668"),a[77]=new Array("سیدعباس ","4669"),a[78]=new Array("گوریه ","4670"),a[79]=new Array("جنتمکان ","4671"),a[80]=new Array("گتوند ","4672"),a[81]=new Array("پیردالو ","4673"),a[82]=new Array("شهرکنورمحمدی ","4674"),a[83]=new Array("گاومیش آباد ","4675"),a[84]=new Array("عربحسن ","4676"),a[85]=new Array("صفی آباد ","4677"),a[86]=new Array("شهرک امام خمینی ","4678"),a[87]=new Array("مهمانشهراصفهانی ","4679"),a[88]=new Array("بردگوری ","4680"),a[89]=new Array("نبات ","4681"),a[90]=new Array("چلون ","4682"),a[91]=new Array("شرکت کاغذسازی پار ","4683"),a[92]=new Array("مزرعه یک ","4684"),a[93]=new Array("خرج راضی احمد ","4685"),a[94]=new Array("الوانی ","4686"),a[95]=new Array("همله تیمور ","4687"),a[96]=new Array("شهرک بهرام ","4688"),a[97]=new Array("صالحمشطت ","4689"),a[98]=new Array("شهرک انصار ","4690"),a[99]=new Array("قلعه خواجو ","4691"),a[100]=new Array("حسینیه ","4692"),a[101]=new Array("کلگهدره2 ","4693"),a[102]=new Array("تلهزنگ ","4694"),a[103]=new Array("چمکلگ ","4695"),a[104]=new Array("عنبر ","4696"),a[105]=new Array("لالی ","4697"),a[106]=new Array("دره بوری ","4698"),a[107]=new Array("هفتگل ","4699"),a[108]=new Array("کوشکک کوشک ","4700"),a[109]=new Array("قلعه خواجه ـ اندیکا ","4701"),a[110]=new Array("گلگیر","4702");break;case"فارس":case"fars":a[1]=new Array("بهمن ","5574"),a[2]=new Array("بندامیر ","4808"),a[3]=new Array("اکبرآباد ","4809"),a[4]=new Array("خیرآبادتوللی ","4810"),a[5]=new Array("داریان ","4811"),a[6]=new Array("کچل آباد ","4812"),a[7]=new Array("گشنکان ","4813"),a[8]=new Array("کمجان ","4814"),a[9]=new Array("شورجه ","4815"),a[10]=new Array("مهارلونو ","4816"),a[11]=new Array("کوهنجان ","4817"),a[12]=new Array("سلطان آباد ","4818"),a[13]=new Array("تفیهان ","4819"),a[14]=new Array("طسوج ","4820"),a[15]=new Array("اکبرآبادکوار ","4821"),a[16]=new Array("مظفری ","4822"),a[17]=new Array("کوشک بیدک ","4823"),a[18]=new Array("فتح آباد ","4824"),a[19]=new Array("دهشیب ","4825"),a[20]=new Array("چنارراهدار ","4826"),a[21]=new Array("موردراز ","4827"),a[22]=new Array("کوشک بیبیچه ","4828"),a[23]=new Array("کلاتون ","4829"),a[24]=new Array("کلانی ","4830"),a[25]=new Array("کمارج ","4831"),a[26]=new Array("مهبودی علیا ","4832"),a[27]=new Array("وراوی ","4833"),a[28]=new Array("حکیم باشی ","4834"),a[29]=new Array("کنارتخته ","4835"),a[30]=new Array("خشت ","4836"),a[31]=new Array("انارستان ","4837"),a[32]=new Array("نودان ","4838"),a[33]=new Array("مهرنجان ","4839"),a[34]=new Array("جره ","4840"),a[35]=new Array("بالاده ","4841"),a[36]=new Array("لپوئی ","4842"),a[37]=new Array("کام فیروز ","4843"),a[38]=new Array("خرامه ","4844"),a[39]=new Array("سروستان ","4845"),a[40]=new Array("کوار ","4846"),a[41]=new Array("کدسنج ","4847"),a[42]=new Array("ماهسرم علیا ","4848"),a[43]=new Array("گویم ","4849"),a[44]=new Array("کلاه سیاه ","4850"),a[45]=new Array("بابامیر ","4851"),a[46]=new Array("آهنگری ","4852"),a[47]=new Array("پیرین ","4853"),a[48]=new Array("حسین آبادرستم ","4854"),a[49]=new Array("مصیری ـ رستم ","4855"),a[50]=new Array("میشان ","4856"),a[51]=new Array("بهرغان ","4857"),a[52]=new Array("بیضا ","4858"),a[53]=new Array("دهپاگا ","4859"),a[54]=new Array("کمهر ","4860"),a[55]=new Array("راشک علیا ","4861"),a[56]=new Array("هرایجان ","4862"),a[57]=new Array("بانش ","4863"),a[58]=new Array("کوشک ","4864"),a[59]=new Array("خانیمن ","4865"),a[60]=new Array("سعادت شهر ـ پاسارگاد ","4866"),a[61]=new Array("قادرآباد ","4867"),a[62]=new Array("ارسنجان ","4868"),a[63]=new Array("سیدان ","4869"),a[64]=new Array("زنگی آباد ","4870"),a[65]=new Array("کوشکک ","4871"),a[66]=new Array("خنجشت ","4872"),a[67]=new Array("امامزاده اسماعیل ","4873"),a[68]=new Array("حسن آباد ","4874"),a[69]=new Array("آس پاس ","4875"),a[70]=new Array("سده ","4876"),a[71]=new Array("بازیچه ","4877"),a[72]=new Array("دژکرد ","4878"),a[73]=new Array("شهرمیان ","4879"),a[74]=new Array("صغاد ","4880"),a[75]=new Array("بوانات ","4881"),a[76]=new Array("صفاشهر ـ خرم بید ","4882"),a[77]=new Array("خرمی ","4883"),a[78]=new Array("علاءمرودشت ","4884"),a[79]=new Array("فیشور ","4885"),a[80]=new Array("کازرون ","3545"),a[81]=new Array("جهرم ","3546"),a[82]=new Array("اردکان ـ سپیدان ","3710"),a[83]=new Array("مرودشت ","3711"),a[84]=new Array("اقلید ","3712"),a[85]=new Array("آباده ","3713"),a[86]=new Array("لار ـ لارستان ","3714"),a[87]=new Array("گراش ","3715"),a[88]=new Array("استهبان ","3716"),a[89]=new Array("فسا ","3717"),a[90]=new Array("فیروزآباد ","3718"),a[91]=new Array("داراب ","3719"),a[92]=new Array("نی ریز ","3720"),a[93]=new Array("شیراز ","3384"),a[94]=new Array("بوانات(سوریان) ","3260"),a[95]=new Array("سورمق ","3261"),a[96]=new Array("ایزدخواست ","3262"),a[97]=new Array("حیدرآباد ","3263"),a[98]=new Array("ابدون ","3264"),a[99]=new Array("باب انار ","3265"),a[100]=new Array("بندبست ","3266"),a[101]=new Array("آبگرم مینا ","3267"),a[102]=new Array("اوز ","3268"),a[103]=new Array("لامرد ","3269"),a[104]=new Array("جویم ","3270"),a[105]=new Array("بنارویه ","3271"),a[106]=new Array("لطیفی ","3272"),a[107]=new Array("بیرم ","3273"),a[108]=new Array("اشکنان ","3274"),a[109]=new Array("کهنه ","3275"),a[110]=new Array("خنج ","3276"),a[111]=new Array("مهر ","3277"),a[112]=new Array("رونیز ","3278"),a[113]=new Array("بنوان ","3279"),a[114]=new Array("ایج ","3280"),a[115]=new Array("درب قلعه ","3281"),a[116]=new Array("قلعه دمتنگ ","3282"),a[117]=new Array("قطب آباد ","3283"),a[118]=new Array("دنیان ","3284"),a[119]=new Array("سروو ","3285"),a[120]=new Array("مانیان ","3286"),a[121]=new Array("بهجان ","3287"),a[122]=new Array("کوشک قاضی ","3288"),a[123]=new Array("خیرآباد جنگل ","3289"),a[124]=new Array("نوبندگان ","3290"),a[125]=new Array("ششده ","3291"),a[126]=new Array("قاسم آباد سفلی ","3292"),a[127]=new Array("زاهدشهر ","3293"),a[128]=new Array("میانده ","3294"),a[129]=new Array("صحرارود ","3295"),a[130]=new Array("بایگان ","3296"),a[131]=new Array("مبارک آباد ","3297"),a[132]=new Array("میمند ","3298"),a[133]=new Array("افزر ","3299"),a[134]=new Array("قیر ","3300"),a[135]=new Array("فراشبند ","3301"),a[136]=new Array("دهرم ","3302"),a[137]=new Array("چوگان ","3303"),a[138]=new Array("مادوان ","3304"),a[139]=new Array("ماهسالاری ","3305"),a[140]=new Array("رستاق ","3306"),a[141]=new Array("دوبران ","3307"),a[142]=new Array("حاجی آباد ـ زرین دشت ","3308"),a[143]=new Array("فدامی ","3309"),a[144]=new Array("چمن مروارید ","3310"),a[145]=new Array("جنت شهر(دهخیر) ","3311"),a[146]=new Array("لای حنا ","3312"),a[147]=new Array("آباده طشک ","3313"),a[148]=new Array("قطاربنه ","3314"),a[149]=new Array("دهکرگی ","3315"),a[150]=new Array("جعفرآباد ","3316"),a[151]=new Array("مشکان ","3317"),a[152]=new Array("قطرویه ","3318"),a[153]=new Array("هرگان ","3319"),a[154]=new Array("خاوران ","3320"),a[155]=new Array("خفر ","3321"),a[156]=new Array("قائمیه ","3123"),a[157]=new Array("زرقان ","3124"),a[158]=new Array("نورآباد ـ ممسنی","3125");break;case"اصفهان":case"isfahan":a[1]=new Array("نوش آباد ","5577"),a[2]=new Array("بهارستان ","5578"),a[3]=new Array("نصر آباد ","5579"),a[4]=new Array("سگزی ","5580"),a[5]=new Array("تودشک ","5581"),a[6]=new Array("بادرود ","5582"),a[7]=new Array("خالدآباد ","5583"),a[8]=new Array("کوشک ","5584"),a[9]=new Array("نیاسر ","5585"),a[10]=new Array("ابریشم ","5586"),a[11]=new Array("افوس ","5587"),a[12]=new Array("رهنان ","5575"),a[13]=new Array("خوراسگان ","5514"),a[14]=new Array("دستجاء ","5515"),a[15]=new Array("شهرک صنعتی مورچ ","5516"),a[16]=new Array("پاسگاه امام جعفر ","5517"),a[17]=new Array("پالایشگاه اصفهان ","5518"),a[18]=new Array("کلهرود ","5519"),a[19]=new Array("گرگاب ","5520"),a[20]=new Array("دستگردوبرخوار ","5521"),a[21]=new Array("گز ","5522"),a[22]=new Array("خورزوق ","5523"),a[23]=new Array("حبیب آباد ","5524"),a[24]=new Array("موته ","5525"),a[25]=new Array("وزوان ","5526"),a[26]=new Array("لای بید ","5527"),a[27]=new Array("رباط آقاکمال ","5528"),a[28]=new Array("خسروآباد ","5529"),a[29]=new Array("کمشچه ","5530"),a[30]=new Array("جندق ","5531"),a[31]=new Array("فرخی ","5532"),a[32]=new Array("مزیک ","5533"),a[33]=new Array("مهرجان ","5534"),a[34]=new Array("بیاضیه ","5535"),a[35]=new Array("چوپانان ","5536"),a[36]=new Array("بلان ","5537"),a[37]=new Array("محمدآباد ","5538"),a[38]=new Array("هرند ","5539"),a[39]=new Array("ورزنه ","5540"),a[40]=new Array("قهجاورستان ","5541"),a[41]=new Array("نیک آباد ","5542"),a[42]=new Array("اژیه ","5543"),a[43]=new Array("حسن اباد ","5544"),a[44]=new Array("کچومثقال ","5545"),a[45]=new Array("ظفرقند ","5546"),a[46]=new Array("نهوج ","5547"),a[47]=new Array("نیسیان ","5548"),a[48]=new Array("ومکان ","5549"),a[49]=new Array("همسار ","5550"),a[50]=new Array("فسخود ","5551"),a[51]=new Array("نوداز ","5552"),a[52]=new Array("اشکستان ","5553"),a[53]=new Array("کجان ","5554"),a[54]=new Array("نیستانک ","5555"),a[55]=new Array("انارک ","5556"),a[56]=new Array("بافران ","5557"),a[57]=new Array("تیرانچی ","5558"),a[58]=new Array("اصغرآباد ","5559"),a[59]=new Array("دستگردفداره ","5560"),a[60]=new Array("قرطمان ","5561"),a[61]=new Array("جعفرآباد ","5562"),a[62]=new Array("مهاباد ","5563"),a[63]=new Array("درقه ","5564"),a[64]=new Array("شهراب ","5565"),a[65]=new Array("تورزن ","5566"),a[66]=new Array("کریم آباد ","5567"),a[67]=new Array("تلک آباد ","5568"),a[68]=new Array("موغار ","5569"),a[69]=new Array("خوانسارک ","5570"),a[70]=new Array("پیربکران ","5571"),a[71]=new Array("کلیشادوسودرجان ","5572"),a[72]=new Array("جوچی ","5573"),a[73]=new Array("کرمگان ","5086"),a[74]=new Array("باغکومه ","5087"),a[75]=new Array("سهروفیروزان ","5088"),a[76]=new Array("لارگان ","5089"),a[77]=new Array("اشترجان ","5090"),a[78]=new Array("گارماسه ","5091"),a[79]=new Array("حسین آبادازران ","5092"),a[80]=new Array("شیردوان ","5093"),a[81]=new Array("جوجیل ","5094"),a[82]=new Array("ورنامخواست ","5095"),a[83]=new Array("سده لنجان ","5096"),a[84]=new Array("چرمهین ","5097"),a[85]=new Array("باغ بهارداران ","5098"),a[86]=new Array("نوگوران ","5099"),a[87]=new Array("چمگردان ","5100"),a[88]=new Array("کرجگان ","5101"),a[89]=new Array("دیزیچه ","5102"),a[90]=new Array("زیبا شهر ","5103"),a[91]=new Array("باغملک ","5104"),a[92]=new Array("دهسرخ ","5105"),a[93]=new Array("پلی اکریل ","5106"),a[94]=new Array("فولادمبارکه ","5107"),a[95]=new Array("کرکوند ","5108"),a[96]=new Array("زاینده رود ","5109"),a[97]=new Array("چمنور ","5110"),a[98]=new Array("کجرثیه ","5111"),a[99]=new Array("اشیان ","5112"),a[100]=new Array("طالخونچه ","5113"),a[101]=new Array("نکوآباد ","5114"),a[102]=new Array("رضوان شهر ","5115"),a[103]=new Array("ورپشت ","5116"),a[104]=new Array("عسگران ","5117"),a[105]=new Array("گندان ","5118"),a[106]=new Array("عزیزآباد ","5119"),a[107]=new Array("میرآباد ","5120"),a[108]=new Array("حاجی آباد ","5121"),a[109]=new Array("خیرآباد ","5122"),a[110]=new Array("اشن ","5123"),a[111]=new Array("خونداب ","5124"),a[112]=new Array("حسین آباد ","5125"),a[113]=new Array("غرغن ","5126"),a[114]=new Array("دامنه ","5127"),a[115]=new Array("بوئین ومیاندشت ","5128"),a[116]=new Array("زرنه ","5129"),a[117]=new Array("بلطاق ","5130"),a[118]=new Array("کرچ ","5131"),a[119]=new Array("قره بلطاق ","5132"),a[120]=new Array("مجتمع مسکونی سدزا ","5133"),a[121]=new Array("مشهد کاوه ","5134"),a[122]=new Array("اسکندری برآفتاب ","5135"),a[123]=new Array("رزوه ","5136"),a[124]=new Array("نهرخلج ","5137"),a[125]=new Array("چاه غلامرضارحیمی ","5138"),a[126]=new Array("اورگان ","5139"),a[127]=new Array("گلدشت ","5140"),a[128]=new Array("جوزدان ","5141"),a[129]=new Array("کهریزسنگ ","5142"),a[130]=new Array("نهضت آباد ","5143"),a[131]=new Array("قلعسرخ ","5144"),a[132]=new Array("اسلام ابادموگوئی ","5145"),a[133]=new Array("مصیر ","5146"),a[134]=new Array("برف انبار ","5147"),a[135]=new Array("قمشلو ","5148"),a[136]=new Array("قمبوان ","5149"),a[137]=new Array("مهیار ","5150"),a[138]=new Array("پیرزان ","5151"),a[139]=new Array("منوچهرآباد ","5152"),a[140]=new Array("شهرک شیمیائی رازی ","5153"),a[141]=new Array("همگین ","5154"),a[142]=new Array("موسی آباد ","5155"),a[143]=new Array("کهرویه ","5156"),a[144]=new Array("قصرچم ","5157"),a[145]=new Array("اسلام آباد ","5158"),a[146]=new Array("امین آباد ","5159"),a[147]=new Array("مقصودبیک ","5160"),a[148]=new Array("سولار ","5161"),a[149]=new Array("منظریه ","5162"),a[150]=new Array("گرموک ","5163"),a[151]=new Array("مزرعه بانه ","5164"),a[152]=new Array("هست ","5165"),a[153]=new Array("ونک ","5166"),a[154]=new Array("قبرکیفا ","5167"),a[155]=new Array("کهنگان ","5168"),a[156]=new Array("کمه ","5169"),a[157]=new Array("مورک ","5170"),a[158]=new Array("چهارراه ","5171"),a[159]=new Array("دهنساء سفلی ","5172"),a[160]=new Array("اغداش ","5173"),a[161]=new Array("چشمه رحمان ","5174"),a[162]=new Array("ورق ","5175"),a[163]=new Array("سعادت آباد ","5176"),a[164]=new Array("فتح آباد ","5177"),a[165]=new Array("سنسن ","5178"),a[166]=new Array("کامو ","5179"),a[167]=new Array("دهریز ","5180"),a[168]=new Array("رجق ","5181"),a[169]=new Array("ابشیرین ","5182"),a[170]=new Array("نشلج ","5183"),a[171]=new Array("مشکات ","5184"),a[172]=new Array("سفید شهر ","5185"),a[173]=new Array("مزرعه صدر ","5186"),a[174]=new Array("ابوزیدآباد ","5187"),a[175]=new Array("کاغذی ","5188"),a[176]=new Array("قهرود ","5189"),a[177]=new Array("جوشقان و کامو ","5190"),a[178]=new Array("برزک ","5191"),a[179]=new Array("اسحق آباد ","5192"),a[180]=new Array("وادقان ","5193"),a[181]=new Array("اذران ","5194"),a[182]=new Array("طرق ","5195"),a[183]=new Array("اریسمان ","5196"),a[184]=new Array("ابیانه ","5197"),a[185]=new Array("اوره ","5198"),a[186]=new Array("کامه ","5199"),a[187]=new Array("ملازجان ","5200"),a[188]=new Array("سعیدآباد ","5201"),a[189]=new Array("مرغ ","5202"),a[190]=new Array("قرغن ","5203"),a[191]=new Array("کوچری ","5204"),a[192]=new Array("کلوچان ","5205"),a[193]=new Array("گلشهر ","5206"),a[194]=new Array("وداغ ","5207"),a[195]=new Array("زرنجان ","5208"),a[196]=new Array("وانشان ","5209"),a[197]=new Array("تیکن ","5210"),a[198]=new Array("سنگ سفید ","5211"),a[199]=new Array("رحمت آباد ","5212"),a[200]=new Array("خمپیچ ","5213"),a[201]=new Array("مهرآباد ","5214"),a[202]=new Array("تیدجان ","5215"),a[203]=new Array("خشک رود ","5216"),a[204]=new Array("ویست ","5217"),a[205]=new Array("سپاهان شهر ","5218"),a[206]=new Array("شاهین شهر ","3552"),a[207]=new Array("خمینی شهر ","3553"),a[208]=new Array("نجف آباد ","3554"),a[209]=new Array("شهرضا ","3555"),a[210]=new Array("کاشان ","3556"),a[211]=new Array("مورچه خورت ","3761"),a[212]=new Array("دولت آباد ","3762"),a[213]=new Array("میمه ","3763"),a[214]=new Array("خور ","3764"),a[215]=new Array("کوهپایه ","3765"),a[216]=new Array("اردستان ","3766"),a[217]=new Array("نائین ","3767"),a[218]=new Array("درچه ","3768"),a[219]=new Array("زواره ","3769"),a[220]=new Array("فلاورجان ","3770"),a[221]=new Array("قهد ریجان ","3771"),a[222]=new Array("زرین شهر ـ لنجان ","3772"),a[223]=new Array("مبارکه ","3773"),a[224]=new Array("فولادشهر ","3774"),a[225]=new Array("تیران ","3775"),a[226]=new Array("دهق ","3776"),a[227]=new Array("علویچه ","3777"),
|
2 |
+
a[228]=new Array("داران ـ فریدن ","3778"),a[229]=new Array("چادگان ","3779"),a[230]=new Array("ویلاشهر ","3780"),a[231]=new Array("فریدون شهر ","3781"),a[232]=new Array("اصفهان ","3386"),a[233]=new Array("شهرک مجلسی ","2983"),a[234]=new Array("دهاقان ","2984"),a[235]=new Array("اسفرجان ","2985"),a[236]=new Array("سمیرم ","2986"),a[237]=new Array("حنا ","2987"),a[238]=new Array("مهرگرد ","2988"),a[239]=new Array("جوشقان استرک ","2989"),a[240]=new Array("آران وبیدگل ","2990"),a[241]=new Array("قمصر ","2991"),a[242]=new Array("نطنز ","2992"),a[243]=new Array("گلپایگان ","2993"),a[244]=new Array("گوگد ","2994"),a[245]=new Array("خوانسار","2995");break;case"خراسان رضوی":case"khorasan - razavi":case"khorasan-razavi":a[1]=new Array("گیفان بالا ","2832"),a[2]=new Array("دررود ","3013"),a[3]=new Array("طرقبه ـ بینالود ","3018"),a[4]=new Array("چناران ","3019"),a[5]=new Array("کلات ","3020"),a[6]=new Array("سرخس ","3021"),a[7]=new Array("فریمان ","3022"),a[8]=new Array("مشهد ","3387"),a[9]=new Array("قزاقی ","2893"),a[10]=new Array("بام ","2894"),a[11]=new Array("راهچمن ","2881"),a[12]=new Array("انداده ","2882"),a[13]=new Array("نقاب ـ جوین ","2883"),a[14]=new Array("حکم اباد ","2884"),a[15]=new Array("برغمد ","2885"),a[16]=new Array("بلاش اباد ","2886"),a[17]=new Array("نوده انقلاب ","2887"),a[18]=new Array("رباط جز ","2888"),a[19]=new Array("شامکان ","2889"),a[20]=new Array("تندک ","2890"),a[21]=new Array("شقان ","3024"),a[22]=new Array("قوچان ","3025"),a[23]=new Array("درگز ","3026"),a[24]=new Array("فیض آباد ـ مه ولات ","3027"),a[25]=new Array("رشتخوار ","3028"),a[26]=new Array("کدکن ","3029"),a[27]=new Array("خواف ","3030"),a[28]=new Array("تربت جام ","3031"),a[29]=new Array("صالح آباد ","3032"),a[30]=new Array("تایباد ","3033"),a[31]=new Array("داورزن ","3034"),a[32]=new Array("جغتای ","3035"),a[33]=new Array("ششتمد ","3036"),a[34]=new Array("کاشمر ","3037"),a[35]=new Array("بردسکن ","3038"),a[36]=new Array("گناباد ","3039"),a[37]=new Array("خرم ده غربی ","2825"),a[38]=new Array("امیرآباد ","2827"),a[39]=new Array("گریوان ","2828"),a[40]=new Array("بدرانلو ","2829"),a[41]=new Array("اینچه علیا ","2816"),a[42]=new Array("امند ","2817"),a[43]=new Array("کهنه جلگه ","2818"),a[44]=new Array("یکه سعودعلیا ","2819"),a[45]=new Array("راستقان ","2820"),a[46]=new Array("غلامان ","2821"),a[47]=new Array("اصغرآباد ","2822"),a[48]=new Array("چمنبید ","2823"),a[49]=new Array("قاسمخان ","2896"),a[50]=new Array("رزق اباد ","2897"),a[51]=new Array("سارمران ","2898"),a[52]=new Array("روئین ","2899"),a[53]=new Array("اوندر ","2900"),a[54]=new Array("ریوش(کوهسرخ) ","2901"),a[55]=new Array("دهنو ","2902"),a[56]=new Array("فدافند ","2903"),a[57]=new Array("خلیل آباد ","2904"),a[58]=new Array("کندر ","2905"),a[59]=new Array("بند قرائ ","2906"),a[60]=new Array("کاسف ","2907"),a[61]=new Array("کبودان ","2908"),a[62]=new Array("شفیع اباد ","2909"),a[63]=new Array("رکناباد ","2910"),a[64]=new Array("شهرآباد ","2911"),a[65]=new Array("انابد ","2912"),a[66]=new Array("میرآباد مازول ","2774"),a[67]=new Array("فرخک ","2775"),a[68]=new Array("خرو ","2776"),a[69]=new Array("قدمگاه ","2777"),a[70]=new Array("اسحاق آباد ","2778"),a[71]=new Array("خوجان ","2779"),a[72]=new Array("عشق آباد ","2780"),a[73]=new Array("اوارشک ","2781"),a[74]=new Array("ملک آباد ","2782"),a[75]=new Array("گورده ","2783"),a[76]=new Array("شاندیز ","2784"),a[77]=new Array("طوس سفلی ","2785"),a[78]=new Array("قرقی سفلی ","2786"),a[79]=new Array("کنویست ","2787"),a[80]=new Array("رادکان ","2788"),a[81]=new Array("سیدآباد ","2789"),a[82]=new Array("گلبهار ","2790"),a[83]=new Array("سلوگرد ","2791"),a[84]=new Array("ارداک ","2792"),a[85]=new Array("بقمچ ","2793"),a[86]=new Array("گلمکان ","2794"),a[87]=new Array("شهرک رضوی ","2795"),a[88]=new Array("میامی ","2796"),a[89]=new Array("چاهک ","2797"),a[90]=new Array("شهر زو ","2798"),a[91]=new Array("گوش ","2799"),a[92]=new Array("نریمانی سفلی ","2800"),a[93]=new Array("تقی آباد ","2801"),a[94]=new Array("کچولی ","2802"),a[95]=new Array("شیرتپه ","2803"),a[96]=new Array("پس کمر ","2804"),a[97]=new Array("مزداوند ","2805"),a[98]=new Array("بزنگان ","2806"),a[99]=new Array("گنبدلی ","2807"),a[100]=new Array("کندکلی ","2808"),a[101]=new Array("کته شمشیرسفلی ","2809"),a[102]=new Array("سنگبست ","2810"),a[103]=new Array("سفید سنگ ","2811"),a[104]=new Array("قلندرآباد ","2812"),a[105]=new Array("فرهادگرد ","2813"),a[106]=new Array("زرکک ","2814"),a[107]=new Array("کهنه اوغاز ","2835"),a[108]=new Array("دوین ","2836"),a[109]=new Array("گلیان ","2837"),a[110]=new Array("زاورم ","2838"),a[111]=new Array("زیارت ","2839"),a[112]=new Array("رباط ","2840"),a[113]=new Array("شهرکهنه ","2841"),a[114]=new Array("قریه شرف ","2842"),a[115]=new Array("نشتیفان ","2843"),a[116]=new Array("سنگان ","2844"),a[117]=new Array("مزن آباد ","2845"),a[118]=new Array("قاسم آباد ","2846"),a[119]=new Array("چمن آباد ","2847"),a[120]=new Array("حسن آباد ","2848"),a[121]=new Array("سلامی ","2849"),a[122]=new Array("چشمه گل ","2850"),a[123]=new Array("سمیع آباد ","2851"),a[124]=new Array("نیل شهر ","2852"),a[125]=new Array("احمدآباد صولت ","2853"),a[126]=new Array("نصرآباد ","2854"),a[127]=new Array("ابدال آباد ","2855"),a[128]=new Array("کاریزنو ","2856"),a[129]=new Array("درزاب علیا ","2857"),a[130]=new Array("محموداباد ","2858"),a[131]=new Array("یاقوتین جدید ","2859"),a[132]=new Array("جنت اباد ","2860"),a[133]=new Array("موسی اباد ","2861"),a[134]=new Array("نبی تاک ","2862"),a[135]=new Array("ازاده ","2863"),a[136]=new Array("کاریز ","2864"),a[137]=new Array("درفارون ","2865"),a[138]=new Array("کرات ","2866"),a[139]=new Array("مشهدریزه ","2867"),a[140]=new Array("باخرز ","2868"),a[141]=new Array("قلعه نو ","2869"),a[142]=new Array("کوهسفید ","2870"),a[143]=new Array("مهر ","2871"),a[144]=new Array("رباط سرپوش ","2872"),a[145]=new Array("مشکان ","2873"),a[146]=new Array("نامن ","2874"),a[147]=new Array("رودآب ","2875"),a[148]=new Array("بنفج ","2876"),a[149]=new Array("مزینان ","2877"),a[150]=new Array("دستوران ","2878"),a[151]=new Array("ازادوار ","2879"),a[152]=new Array("نیشابور ","3559"),a[153]=new Array("تربت حیدریه ","3561"),a[154]=new Array("سبزوار ","3562"),a[155]=new Array("چرمه ","5395"),a[156]=new Array("ارسک ","5396"),a[157]=new Array("رقه ","5397"),a[158]=new Array("کرند ","5398"),a[159]=new Array("اصفاک ","5399"),a[160]=new Array("نیگان ","5400"),a[161]=new Array("خانکوک ","5401"),a[162]=new Array("شاهرخت ","5390"),a[163]=new Array("دهک ","5384"),a[164]=new Array("میغان ","5385"),a[165]=new Array("طبین بالا ","5386"),a[166]=new Array("بیهود ","5387"),a[167]=new Array("افریر ","5388"),a[168]=new Array("گزیک ","5377"),a[169]=new Array("شاخن ","5378"),a[170]=new Array("گازار ","5379"),a[171]=new Array("چاهداشی ","5380"),a[172]=new Array("چهار فرسخ ","5381"),a[173]=new Array("توتسک ","5382"),a[174]=new Array("چهکند ","5368"),a[175]=new Array("القور ","5369"),a[176]=new Array("درح ","5370"),a[177]=new Array("القار ","5371"),a[178]=new Array("طبس سینا ","5372"),a[179]=new Array("برون ","5392"),a[180]=new Array("مصعبی ","5393"),a[181]=new Array("سلطان آباد ","5594"),a[182]=new Array("رضویه ","5595"),a[183]=new Array("همت آباد ","5596"),a[184]=new Array("دیهوک ","5403"),a[185]=new Array("کریت ","5404"),a[186]=new Array("اسفندیار ","5405"),a[187]=new Array("جوخواه ","5406"),a[188]=new Array("پیرحاجات ","5407"),a[189]=new Array("گزو ","5408"),a[190]=new Array("سربیت ","5409"),a[191]=new Array("مرزداران ","5410"),a[192]=new Array("فیروزه ـ تخت جلگه ","5411"),a[193]=new Array("شوراب ","5312"),a[194]=new Array("گلبوی سفلی ","5313"),a[195]=new Array("مبارکه ","5314"),a[196]=new Array("چکنه ","5315"),a[197]=new Array("برزنون ","5316"),a[198]=new Array("فدیشه ","5317"),a[199]=new Array("بار ","5318"),a[200]=new Array("یلاک ","5319"),a[201]=new Array("دیزادیز ","5320"),a[202]=new Array("جعفرآبادعلیا ","5321"),a[203]=new Array("شفیع ","5322"),a[204]=new Array("دوغایی ","5323"),a[205]=new Array("تیکانلو ","5325"),a[206]=new Array("جوزان ","5326"),a[207]=new Array("امام قلی ","5327"),a[208]=new Array("باجگیران ","5328"),a[209]=new Array("مایوان ","5329"),a[210]=new Array("چریرسالت ","5330"),a[211]=new Array("خرق ","5331"),a[212]=new Array("حسن آبادلائن نو ","5332"),a[213]=new Array("لطف آباد ","5333"),a[214]=new Array("کبکان ","5334"),a[215]=new Array("چاپشلو ","5335"),a[216]=new Array("نوخندان ","5336"),a[217]=new Array("زیندانلو ","5337"),a[218]=new Array("محمدتقی ","5338"),a[219]=new Array("سیوکی ","5339"),a[220]=new Array("مهنه ","5340"),a[221]=new Array("عبدل آباد ","5341"),a[222]=new Array("شادمهر ","5342"),a[223]=new Array("بایک ","5344"),a[224]=new Array("چخماق ","5345"),a[225]=new Array("قلعه آقاحسن ","5346"),a[226]=new Array("زرغری ","5347"),a[227]=new Array("جنگل ","5348"),a[228]=new Array("باسفر ","5349"),a[229]=new Array("دولت آباد ـ زاوه ","5350"),a[230]=new Array("یک لنگی علیا ","5351"),a[231]=new Array("کامه سفلی ","5352"),a[232]=new Array("رودخانه ","5353"),a[233]=new Array("رباط سنگ ","5354"),a[234]=new Array("اسدآباد ","5355"),a[235]=new Array("نسر ","5356"),a[236]=new Array("درونه ","5357"),a[237]=new Array("یونسی ","5358"),a[238]=new Array("بیدخت ","5359"),a[239]=new Array("گیسوبالا ","5360"),a[240]=new Array("کاخک ","5361"),a[241]=new Array("زیبد ","5362"),a[242]=new Array("بجستان ","5363"),a[243]=new Array("جزین ","5364"),a[244]=new Array("ماژان ","5365"),a[245]=new Array("روبیات","5366");break;case"قزوین":case"qazvin":a[1]=new Array("قزوین ","3512"),a[2]=new Array("شهر صنعتی البرز ","3595"),a[3]=new Array("اقبالیه ","3596"),a[4]=new Array("الوند ـ البرز ","3597"),a[5]=new Array("آبیک ","3598"),a[6]=new Array("بوئین زهرا ","3599"),a[7]=new Array("َآوج ","3600"),a[8]=new Array("طالقان ","3601"),a[9]=new Array("تاکستان ","3602"),a[10]=new Array("محمدیه ","3603"),a[11]=new Array("محمود آباد نمونه ","3876"),a[12]=new Array("بیدستان ","3877"),a[13]=new Array("الولک ","3878"),a[14]=new Array("کاکوهستان ","3879"),a[15]=new Array("فلار ","3880"),a[16]=new Array("رجائی دشت ","3881"),a[17]=new Array("معلم کلایه ","3882"),a[18]=new Array("مینودشت ","3883"),a[19]=new Array("زوارک ","3884"),a[20]=new Array("صمغ آباد ","3885"),a[21]=new Array("ناصرآباد ","3886"),a[22]=new Array("رشتقون ","3887"),a[23]=new Array("قشلاق ","3888"),a[24]=new Array("خاکعلی ","3889"),a[25]=new Array("لیا ","3890"),a[26]=new Array("سگزآباد ","3891"),a[27]=new Array("عصمت آباد ","3892"),a[28]=new Array("خرم آباد ","3893"),a[29]=new Array("اسفرورین ","3894"),a[30]=new Array("شال ","3895"),a[31]=new Array("دانسفهان ","3896"),a[32]=new Array("قلعه هاشمخان ","3897"),a[33]=new Array("گلنجین ","3898"),a[34]=new Array("استلج ","3899"),a[35]=new Array("آبگرم ","3900"),a[36]=new Array("نیارج ","3901"),a[37]=new Array("حصارولیعصر ","3902"),a[38]=new Array("ماهین ","3903"),a[39]=new Array("سیردان ","3904"),a[40]=new Array("کبح ","3905"),a[41]=new Array("سیاهپوش ","3906"),a[42]=new Array("نیارک ","3907"),a[43]=new Array("آقابابا ","3908"),a[44]=new Array("خرم دشت ","3909"),a[45]=new Array("نهاوند ","3910"),a[46]=new Array("ضیاآباد ","3911"),a[47]=new Array("حسین آباد ","3912"),a[48]=new Array("رحیم آباد ","3913"),a[49]=new Array("یحیی آباد ","3914"),a[50]=new Array("نیکویه ","3915"),a[51]=new Array("رازمیان ","3916"),a[52]=new Array("کوهین ","3917"),a[53]=new Array("ارداق ","5602"),a[54]=new Array("نرجه","5603");break;case"سمنان":case"semnan":a[1]=new Array("خیرآباد ","3918"),a[2]=new Array("میاندره ","3919"),a[3]=new Array("رضاآباد ","3920"),a[4]=new Array("زرطول ","3921"),a[5]=new Array("عطاری ","3922"),a[6]=new Array("اهوان ","3923"),a[7]=new Array("مشیریه ","3924"),a[8]=new Array("جام ","3925"),a[9]=new Array("دوزهیر ","3926"),a[10]=new Array("معدن نمک ","3927"),a[11]=new Array("نظامی ","3928"),a[12]=new Array("اسدآباد ","3929"),a[13]=new Array("لاسجرد ","3930"),a[14]=new Array("سیدآباد ","3931"),a[15]=new Array("عبداله آبادپائین ","3932"),a[16]=new Array("بیابانک ","3933"),a[17]=new Array("مومن آباد ","3934"),a[18]=new Array("درجزین ","3935"),a[19]=new Array("دربند ","3936"),a[20]=new Array("گلرودبار ","3937"),a[21]=new Array("آبگرم ","3938"),a[22]=new Array("افتر ","3939"),a[23]=new Array("فولاد محله ","3940"),a[24]=new Array("ده صوفیان ","3941"),a[25]=new Array("هیکو ","3942"),a[26]=new Array("چاشم ","3943"),a[27]=new Array("کردوان ","3944"),a[28]=new Array("مندولک ","3945"),a[29]=new Array("داورآباد ","3946"),a[30]=new Array("ارادان ","3947"),a[31]=new Array("رامه پائین ","3948"),a[32]=new Array("بنکوه ","3949"),a[33]=new Array("کهن آباد ","3950"),a[34]=new Array("چمن آبادکوروس ","3951"),a[35]=new Array("کرک ","3952"),a[36]=new Array("گلستانک ","3953"),a[37]=new Array("لجران ","3954"),a[38]=new Array("جودانه ","3955"),a[39]=new Array("ابراهیم آباد بالا ","3956"),a[40]=new Array("بکران ","3957"),a[41]=new Array("کردآباد ","3958"),a[42]=new Array("نردین ","3959"),a[43]=new Array("سوداغلن ","3960"),a[44]=new Array("فرومه ","3961"),a[45]=new Array("ابرسیج ","3962"),a[46]=new Array("میغان ","3963"),a[47]=new Array("قلعه نوخرقان ","3964"),a[48]=new Array("چهل دختر نظامی ","3965"),a[49]=new Array("کلاته خیج ","3966"),a[50]=new Array("نگارمن ","3967"),a[51]=new Array("ده ملا ","3968"),a[52]=new Array("رویان ","3969"),a[53]=new Array("بوشت ","3970"),a[54]=new Array("سطوه ","3971"),a[55]=new Array("طرود ","3972"),a[56]=new Array("مغان ","3973"),a[57]=new Array("گیور ","3974"),a[58]=new Array("دستجرد ","3975"),a[59]=new Array("مسیح آباد ","3976"),a[60]=new Array("احمدآباد ","3977"),a[61]=new Array("زمان آباد ","3978"),a[62]=new Array("سلم رود ","3979"),a[63]=new Array("جزن ","3980"),a[64]=new Array("برم ","3981"),a[65]=new Array("محمدآباد ","3982"),a[66]=new Array("معصوم آباد ","3983"),a[67]=new Array("فرات ","3984"),a[68]=new Array("علیان ","3985"),a[69]=new Array("عمروان ","3986"),a[70]=new Array("قوشه ","3987"),a[71]=new Array("دروار ","3988"),a[72]=new Array("آستانه ","3989"),a[73]=new Array("دیباج ","3990"),a[74]=new Array("طزره ","3991"),a[75]=new Array("مهماندوست ","3992"),a[76]=new Array("کلاته ملا ","3993"),a[77]=new Array("قدرت آباد ","3994"),a[78]=new Array("علا ","3604"),a[79]=new Array("آبخوری ","3605"),a[80]=new Array("سرخه ","3606"),a[81]=new Array("مهدی شهر ","3607"),a[82]=new Array("شهمیرزاد ","3608"),a[83]=new Array("گرمسار ","3609"),a[84]=new Array("ایوانکی ","3610"),a[85]=new Array("میامی ","3611"),a[86]=new Array("بسطام ","3612"),a[87]=new Array("مجن ","3613"),a[88]=new Array("بیارجمند ","3614"),a[89]=new Array("دامغان ","3615"),a[90]=new Array("امیریه ","3616"),a[91]=new Array("سمنان ","3513"),a[92]=new Array("شاهرود","3514");break;case"قم":case"qom":a[1]=new Array("قنوات ","3617"),a[2]=new Array("دستجرد ","3618"),a[3]=new Array("امیر آباد گنجه ","3995"),a[4]=new Array("قمرود ","3996"),a[5]=new Array("کهک ","3997"),a[6]=new Array("قلعه چم ","3998"),a[7]=new Array("قاهان ","3999"),a[8]=new Array("شهر جعفریه ","4000"),a[9]=new Array("جنداب ","4001"),a[10]=new Array("سلفچگان ","4002"),a[11]=new Array("قم","3515");break;case"مرکزی":case"markazi":a[1]=new Array("محلات ","3621"),a[2]=new Array("دلیجان ","3622"),a[3]=new Array("خنداب ","3623"),a[4]=new Array("کمیجان ","3624"),a[5]=new Array("شازند ","3625"),a[6]=new Array("آستانه ","3626"),a[7]=new Array("خمین ","3627"),a[8]=new Array("رباط مراد ","3628"),a[9]=new Array("غرق آباد ","3629"),a[10]=new Array("مامونیه ـ زرندیه ","3630"),a[11]=new Array("تفرش ","3631"),a[12]=new Array("آشتیان ","3632"),a[13]=new Array("سلطان آباد ","4016"),a[14]=new Array("اصفهانک ","4017"),a[15]=new Array("حسین آباد ","4018"),a[16]=new Array("خشک رود ","4019"),a[17]=new Array("حکیم آباد ","4020"),a[18]=new Array("یحیی آباد ","4021"),a[19]=new Array("صدرآباد ","4022"),a[20]=new Array("قطب صنعتی ","4023"),a[21]=new Array("نیمور ","4024"),a[22]=new Array("نخجیروان ","4025"),a[23]=new Array("باقرآباد ","4026"),a[24]=new Array("بزیجان ","4027"),a[25]=new Array("عیسی آباد ","4028"),a[26]=new Array("خورهه ","4029"),a[27]=new Array("دودهک ","4030"),a[28]=new Array("بیجگان ","4031"),a[29]=new Array("خاوه ","4032"),a[30]=new Array("نراق ","4033"),a[31]=new Array("سینقان ","4034"),a[32]=new Array("هستیجان ","4035"),a[33]=new Array("کرهرود ","4036"),a[34]=new Array("قنات ناصری ","4037"),a[35]=new Array("ساروق ","4038"),a[36]=new Array("داودآباد ","4039"),a[37]=new Array("معصومیه ","4040"),a[38]=new Array("انجدان ","4041"),a[39]=new Array("دینه کبود ","4042"),a[40]=new Array("حصارخنداب ","4043"),a[41]=new Array("چیزان ","4044"),a[42]=new Array("جاروسیان ","4045"),a[43]=new Array("ادشته ","4046"),a[44]=new Array("استوه ","4047"),a[45]=new Array("سنجان ","4048"),a[46]=new Array("اناج ","4049"),a[47]=new Array("وفس ","4050"),a[48]=new Array("خسروبیک ","4051"),a[49]=new Array("میلاجرد ","4052"),a[50]=new Array("سقاور ","4053"),a[51]=new Array("هزاوه ","4054"),a[52]=new Array("قدمگاه ","4055"),a[53]=new Array("هفته ","4056"),a[54]=new Array("لنجرود ","4057"),a[55]=new Array("توره ","4058"),a[56]=new Array("کزاز ","4059"),a[57]=new Array("کتیران بالا ","4060"),a[58]=new Array("نهرمیان ","4061"),a[59]=new Array("سرسختی بالا ","4062"),a[60]=new Array("لوزدرعلیا ","4063"),a[61]=new Array("خنادرهوسطی ","4064"),a[62]=new Array("هندودر ","4065"),a[63]=new Array("تواندشت علیا ","4066"),a[64]=new Array("مالمیر ","4067"),a[65]=new Array("چهارچریک ","4068"),a[66]=new Array("خیس آباد ","4069"),a[67]=new Array("چهارچشمه ","4070"),a[68]=new Array("لکان ","4071"),a[69]=new Array("قورچی باشی ","4072"),a[70]=new Array("ورچه ","4073"),a[71]=new Array("فرقهان ","4074"),a[72]=new Array("امامزاده ورچه ","4075"),a[73]=new Array("رباط کمنسان ","4076"),a[74]=new Array("ریحان علیا ","4077"),a[75]=new Array("مزنق ","4078"),a[76]=new Array("خورآوند ","4079"),a[77]=new Array("شیجان علیا ","4080"),a[78]=new Array("گلدشت ","4081"),a[79]=new Array("دهنو ","4082"),a[80]=new Array("نوبران ","4083"),a[81]=new Array("قلعک ","4084"),a[82]=new Array("یلاباد ","4085"),a[83]=new Array("رازقان ","4086"),a[84]=new Array("الویر ","4087"),a[85]=new Array("دوزج ","4088"),a[86]=new Array("علیشار ","4089"),a[87]=new Array("بالقلو ","4090"),a[88]=new Array("زاویه ","4091"),a[89]=new Array("چمران ","4092"),a[90]=new Array("ماقان ","4093"),a[91]=new Array("سامان ","4094"),a[92]=new Array("دخان ","4095"),a[93]=new Array("مراغه ","4096"),a[94]=new Array("فرمهین ","4097"),a[95]=new Array("شهراب ","4098"),a[96]=new Array("زاغر ","4099"),a[97]=new Array("کهک ","4100"),a[98]=new Array("فشک ","4101"),a[99]=new Array("آهنگران ","4102"),a[100]=new Array("علیان آباد ","4103"),a[101]=new Array("مزرعهنو ","4104"),a[102]=new Array("صالح آباد ","4105"),a[103]=new Array("سیاوشان ","4106"),a[104]=new Array("آهو ","4107"),a[105]=new Array("پرندک ","4108"),a[106]=new Array("اراک ","3516"),a[107]=new Array("ساوه ","3517"),a[108]=new Array("شهرک مهاجران","3635");break;case"زنجان":case"zanjan":a[1]=new Array("زنجان ","3521"),a[2]=new Array("محمودآباد ","3196"),a[3]=new Array("باشقشلاق ","3197"),a[4]=new Array("گرماب ","3198"),a[5]=new Array("زرین آباد ـ ایجرود ","3199"),a[6]=new Array("کهلا ","3200"),a[7]=new Array("گیلوان ","3201"),a[8]=new Array("دستجرده ","3202"),a[9]=new Array("سعیدآباد ","3203"),a[10]=new Array("چورزق ","3204"),a[11]=new Array("حلب ","3205"),a[12]=new Array("درام ","3206"),a[13]=new Array(" آب بر ـ طارم ","3207"),a[14]=new Array("زرین رود ","3208"),a[15]=new Array("ماهنشان ","3650"),a[16]=new Array("سلطانیه ","3651"),a[17]=new Array("ابهر ","3652"),a[18]=new Array("خرمدره ","3653"),a[19]=new Array("قیدار ","3654"),a[20]=new Array("همایون ","4222"),a[21]=new Array("بوغداکندی ","4223"),a[22]=new Array("اژدهاتو ","4224"),a[23]=new Array("اسفجین ","4225"),a[24]=new Array("ارمغان خانه ","4226"),a[25]=new Array("قبله بلاغی ","4227"),a[26]=new Array("پری ","4228"),a[27]=new Array("اندآباد علیا ","4229"),a[28]=new Array("قرهگل ","4230"),a[29]=new Array("نیک پی ","4231"),a[30]=new Array("دندی ","4232"),a[31]=new Array("سونتو ","4233"),a[32]=new Array("قلتوق ","4234"),a[33]=new Array("گوزلدره سفلی ","4235"),a[34]=new Array("سنبل آباد ","4236"),a[35]=new Array("دره سجین ","4237"),a[36]=new Array("دولت آباد ","4238"),a[37]=new Array("کینهورس ","4239"),a[38]=new Array("هیدج ","4240"),a[39]=new Array("صائین قلعه ","4241"),a[40]=new Array("اقبلاغ سفلی ","4242"),a[41]=new Array("سهرورد ","4243"),a[42]=new Array("کرسف ","4244"),a[43]=new Array("سجاس","4245");break;case"مازندران":case"mazandaran":a[1]=new Array("شیرنگ علیا ","4340"),a[2]=new Array("مارون کلاته ","4341"),a[3]=new Array("مزرعه کتول ","4342"),a[4]=new Array("حاجی کلاته ","4343"),a[5]=new Array("بدراقنوری ","4344"),a[6]=new Array("خولیندره ","4345"),a[7]=new Array("گامیشلی ","4331"),a[8]=new Array("قرنجیک ","4332"),a[9]=new Array("قلعه محمود ","4333"),a[10]=new Array("کفشگری ","4334"),a[11]=new Array("بالاجاده ","4317"),a[12]=new Array("میاندره ","4320"),a[13]=new Array("ایلوار ","4321"),a[14]=new Array("زلکلان ","4322"),a[15]=new Array("یساقی ","4323"),a[16]=new Array("بندپی ","4324"),a[17]=new Array("مهتر کلا ","4325"),a[18]=new Array("داوکان ","4326"),a[19]=new Array("قره قاشلی ","4327"),a[20]=new Array("پنج پیکر ","4328"),a[21]=new Array("خواجه نفس ","4329"),a[22]=new Array("گلوگاه ـ بابل ","5608"),a[23]=new Array("ایزدشهر ","5609"),a[24]=new Array("تقی آباد ","4336"),a[25]=new Array("پیرواش ","4337"),a[26]=new Array("جعفرآبادنامتلو ","4348"),a[27]=new Array("شش آب ","4349"),a[28]=new Array("کوچک خرطومه ","4350"),a[29]=new Array("ایمرملاساری ","4351"),a[30]=new Array("بیبی شیروان ","4352"),a[31]=new Array("تنگراه ","4367"),a[32]=new Array("صالح آباد چولی ","4368"),a[33]=new Array("کیارام ","4369"),a[34]=new Array("دوزین ","4370"),a[35]=new Array("قلعه قافه ","4371"),a[36]=new Array("کنگور ","4372"),a[37]=new Array("بالایشیخکین گلین ","4373"),a[38]=new Array("پیشکمر ","4374"),a[39]=new Array("بیشک تپه ","4375"),a[40]=new Array("مراوه تپه ","4376"),a[41]=new Array("قرهگل شرقی ","4377"),a[42]=new Array("عزیز آباد ","4378"),a[43]=new Array("یانبلاغ ","4379"),a[44]=new Array("زرگر محله ","4380"),a[45]=new Array("مرزی کلا ","4381"),a[46]=new Array("رودپی ","4382"),a[47]=new Array("معدن قشلاقی ","4354"),a[48]=new Array("فارسیان ","4355"),a[49]=new Array("خوش ییلاق ","4356"),a[50]=new Array("تاتارعلیا ","4357"),a[51]=new Array("پشمک نیاده ","4358"),a[52]=new Array("باغلی مارامه ","4359"),a[53]=new Array("داشلی برون ","4360"),a[54]=new Array("دیگچه ","4361"),a[55]=new Array("حاجیقوشان ","4362"),a[56]=new Array("سارجهگر ","4363"),a[57]=new Array("کرند ","4364"),a[58]=new Array("آمل ","3522"),a[59]=new Array("بابل ","3523"),a[60]=new Array("ساری ","3524"),a[61]=new Array("معلم کلاء ","3209"),a[62]=new Array("سرخرود ","3210"),a[63]=new Array("وسطی کلاء ","3211"),a[64]=new Array("رینه ","3212"),a[65]=new Array("سوا ","3213"),a[66]=new Array("بایجان ","3214"),a[67]=new Array("گزنک ","3215"),a[68]=new Array("چمستان ","3216"),a[69]=new Array("بنفشه ده ","3217"),a[70]=new Array("رئیس کلالاویج ","3218"),a[71]=new Array("اوزه ","3219"),a[72]=new Array("بلده ","3220"),a[73]=new Array("تاکر ","3221"),a[74]=new Array("گلنده رود ","3222"),a[75]=new Array("چلندر ","3223"),a[76]=new Array("صلاح الدین کلاء ","3224"),a[77]=new Array("نارنجبن ","3225"),a[78]=new Array("رویانشهر ","3226"),a[79]=new Array("کجور ","3227"),a[80]=new Array("پولکجور ","3228"),a[81]=new Array("لشکنار ","3229"),a[82]=new Array("هچیرود ","3230"),a[83]=new Array("مرزن آباد ","3231"),a[84]=new Array("کردیچال ","3232"),a[85]=new Array("کلاردشت ","3233"),a[86]=new Array("کلنو ","3234"),a[87]=new Array("دلیر ","3235"),a[88]=new Array("سیاه پیشه ","3236"),a[89]=new Array("کلارآباد ","3237"),a[90]=new Array("عباس آباد ","3238"),a[91]=new Array("سرلنگا ","3239"),a[92]=new Array("کترا ","3240"),a[93]=new Array("گلعلی آباد ","3241"),a[94]=new Array("میانکوه دوهزار ","3242"),a[95]=new Array("مهران سه هزار ","3243"),a[96]=new Array("نشتارود ","3244"),a[97]=new Array("قلعه گردن ","3245"),a[98]=new Array("خرم آباد ","3246"),a[99]=new Array("شیرود ","3247"),a[100]=new Array("سلیمان آباد ","3248"),a[101]=new Array("کشکو ","3249"),a[102]=new Array("لاکتراشان ","3250"),a[103]=new Array("سادات محله ","3251"),a[104]=new Array("کتالم ","3252"),a[105]=new Array("اغوزکتی ","3253"),a[106]=new Array("جواهرده ","3254"),a[107]=new Array("جفت رودبار ","3255"),a[108]=new Array("تهل ","3256"),a[109]=new Array("خوشرودپی ","3257"),a[110]=new Array("آهنگرکلا ","3258"),a[111]=new Array("گاون کلا ","3259"),a[112]=new Array("وقبله ","4246"),a[113]=new Array("شورکش ","4247"),a[114]=new Array("اینچهدان ","4248"),a[115]=new Array("عرب خیل ","4249"),a[116]=new Array("بهنمیر ","4250"),a[117]=new Array("کاسگرمحله ","4251"),a[118]=new Array("کله بست ","4252"),a[119]=new Array("بیشه سر ","4253"),a[120]=new Array("گنج افروز ","4254"),a[121]=new Array("گتاب ","4255"),a[122]=new Array("دابودشت ","4256"),a[123]=new Array("درازکش ","4257"),a[124]=new Array("گردرودبار ","4258"),a[125]=new Array("شهیدآباد ","4259"),a[126]=new Array("احمد چاله پس ","4260"),a[127]=new Array("بالا جنید ","4261"),a[128]=new Array("خطیر کلاء ","4262"),a[129]=new Array("حاجی کلاء صنم ","4263"),a[130]=new Array("واسکس ","4264"),a[131]=new Array("قادیکلاء ","4265"),a[132]=new Array("دیکنده ","4266"),a[133]=new Array("کفشگرکلااوطه ","4267"),a[134]=new Array("کیا کلا ","4268"),a[135]=new Array("بالادسته ","4269"),a[136]=new Array("بیزکی ","4270"),a[137]=new Array("کوهی خیل ","4271"),a[138]=new Array("سنگتاب ","4272"),a[139]=new Array("رکابدارکلا ","4273"),a[140]=new Array("شیر کلا ","4274"),a[141]=new Array("آلاشت ","4275"),a[142]=new Array("لغور ","4276"),a[143]=new Array("اتو ","4277"),a[144]=new Array("شیرگاه ","4278"),a[145]=new Array("پالند ","4279"),a[146]=new Array("چرات ","4280"),a[147]=new Array("دهمیان ","4281"),a[148]=new Array("خشکدره ","4282"),a[149]=new Array("امافت ","4283"),a[150]=new Array("دو آب ","4284"),a[151]=new Array("ورسک ","4285"),a[152]=new Array("کتی لته ","4286"),a[153]=new Array("اروست ","4287"),a[154]=new Array("فریم ","4288"),a[155]=new Array("سنگده ","4289"),a[156]=new Array("قادیکلا ","4290"),a[157]=new Array("تاکام ","4291"),a[158]=new Array("هولار ","4292"),a[159]=new Array("اسبوکلا ","4293"),a[160]=new Array("سورک ","4294"),a[161]=new Array("اسلام آباد ","4295"),a[162]=new Array("گهرباران ","4296"),a[163]=new Array("فرخ آباد ","4297"),a[164]=new Array("داراب کلاء ","4298"),a[165]=new Array("ماچک پشت ","4299"),a[166]=new Array("خورشید ","4300"),a[167]=new Array("زاغمرز ","4301"),a[168]=new Array("چلمردی ","4302"),a[169]=new Array("رستم کلا ","4303"),a[170]=new Array("پائین زرندین ","4304"),a[171]=new Array("بارابسر ","4305"),a[172]=new Array("تیر تاش ","4306"),a[173]=new Array("خلیل شهر ","4307"),a[174]=new Array("حسین آباد ","4308"),a[175]=new Array("دامداری حسن ابوطا ","4309"),a[176]=new Array("بشیرینه ","4310"),a[177]=new Array("سفیدچاه ","4311"),a[178]=new Array("دامداری مجریان ","4312"),a[179]=new Array("محمودآباد ","3655"),a[180]=new Array("نور ","3656"),a[181]=new Array("نوشهر ","3657"),a[182]=new Array("چالوس ","3658"),a[183]=new Array("سلمانشهر ","3659"),a[184]=new Array("تنکابن ","3660"),a[185]=new Array("رامسر ","3661"),a[186]=new Array("امیرکلا ","3662"),a[187]=new Array("بابلسر ","3663"),a[188]=new Array("فریدون کنار ","3664"),a[189]=new Array("قائم شهر ","3665"),a[190]=new Array("جویبار ","3666"),a[191]=new Array("زیرآب ","3667"),a[192]=new Array("پل سفید ـ سوادکوه ","3668"),a[193]=new Array("کیاسر ","3669"),a[194]=new Array("نکاء ","3670"),a[195]=new Array("بهشهر ","3671"),a[196]=new Array("گلوگاه","3672");break;case"گلستان":case"golestan":a[1]=new Array("گرگان ","3525"),a[2]=new Array("بندر گز ","3673"),a[3]=new Array("کردکوی ","3674"),a[4]=new Array("بندرترکمن ","3675"),a[5]=new Array("آق قلا ","3676"),a[6]=new Array("علی آباد ","3677"),a[7]=new Array("آزادشهر ","3678"),a[8]=new Array("گنبدکاوس ","3679"),a[9]=new Array("مینودشت ","3680"),a[10]=new Array("کلاله ","3681"),a[11]=new Array("خان ببین ","4346"),a[12]=new Array("دلند ","4347"),a[13]=new Array("سرخن کلاته ","4335"),a[14]=new Array("نوده خاندوز ","4353"),a[15]=new Array("گالیکش ","4365"),a[16]=new Array("جلین ","4366"),a[17]=new Array("نگین شهر ","4318"),a[18]=new Array("سیمین شهر ","4319"),a[19]=new Array("نوکنده ","4313"),a[20]=new Array("اینچه برون ","4314"),a[21]=new Array("مراوه تپه ","4315"),a[22]=new Array("رامیان ","4316"),a[23]=new Array("گمیش تپه ","4330"),a[24]=new Array("انبار آلوم ","4338"),a[25]=new Array("فاضل آباد","4339");break;case"اردبیل":case"ardabil":a[1]=new Array("اردبیل ","3532"),a[2]=new Array("نمین ","3700"),a[3]=new Array("نیر ","3701"),a[4]=new Array("گرمی ","3702"),a[5]=new Array("مشکین شهر ","3703"),a[6]=new Array("بیله سوار ","3704"),a[7]=new Array("خلخال ","3705"),a[8]=new Array("پارس آباد ","3706"),a[9]=new Array("ابی بیگلو ","4514"),a[10]=new Array("نانهکران ","4515"),a[11]=new Array("عنبران ","4516"),a[12]=new Array("گرده ","4517"),a[13]=new Array("ثمرین ","4518"),a[14]=new Array("اردی موسی ","4519"),a[15]=new Array("سرعین ","4520"),a[16]=new Array("کوارئیم ","4521"),a[17]=new Array("اسلام آباد ","4522"),a[18]=new Array("مهماندوست ","4523"),a[19]=new Array("هیر ","4524"),a[20]=new Array("بقرآباد ","4525"),a[21]=new Array("بودالالو ","4526"),a[22]=new Array("ارالوی بزرگ ","4527"),a[23]=new Array("دیزج ","4528"),a[24]=new Array("حمزه خانلو ","4529"),a[25]=new Array("زهرا ","4530"),a[26]=new Array("انی علیا ","4531"),a[27]=new Array("قاسمکندی ","4532"),a[28]=new Array("تازه کند انگوت ","4533"),a[29]=new Array("قره اغاج پائین ","4534"),a[30]=new Array("پریخان ","4535"),a[31]=new Array("قصابه ","4536"),a[32]=new Array("فخرآباد ","4537"),a[33]=new Array("رضی ","4538"),a[34]=new Array("قوشه سفلی ","4539"),a[35]=new Array("مرادلو ","4540"),a[36]=new Array("گنجوبه ","4541"),a[37]=new Array("گوگ تپه ","4542"),a[38]=new Array("انجیر لو ","4543"),a[39]=new Array("جعفرآباد ","4544"),a[40]=new Array("آغداش کلام ","4545"),a[41]=new Array("خورخور سفلی ","4546"),a[42]=new Array("شورگل ","4547"),a[43]=new Array("نظرعلی بلاغی ","4548"),a[44]=new Array("لنبر ","4549"),a[45]=new Array("فیروزآباد ","4550"),a[46]=new Array("گیوی ـ کوثر ","4551"),a[47]=new Array("خلف لو ","4552"),a[48]=new Array("هشتجین ","4553"),a[49]=new Array("برندق ","4554"),a[50]=new Array("کلور ","4555"),a[51]=new Array("تازه کندقدیم ","4556"),a[52]=new Array("گوشلو ","4557"),a[53]=new Array("اققباق سفلی ","4558"),a[54]=new Array("شهرک شهید غفاری ","4559"),a[55]=new Array("اصلاندوز ","4560"),a[56]=new Array("بلانعلیا ","4561"),a[57]=new Array("لاهرود","4562");break;case"آذربایجان غربی":case"azarbaijan - west":case"azarbaijan-west":a[1]=new Array("باراندوز ","4563"),a[2]=new Array("دیزج دول ","4564"),a[3]=new Array("ابگرم ","4565"),a[4]=new Array("سرنق ","4566"),a[5]=new Array("چهریق علیا ","4567"),a[6]=new Array("داراب ","4568"),a[7]=new Array("دلزی ","4569"),a[8]=new Array("اغ برزه ","4570"),a[9]=new Array("سنجی ","4571"),a[10]=new Array("کیک آباد ","4572"),a[11]=new Array("خاتون باغ ","4573"),a[12]=new Array("حاجی حسن ","4574"),a[13]=new Array("سوگلی تپه ","4575"),a[14]=new Array("کلیجه ","4576"),a[15]=new Array("حاجیکند ","4577"),a[16]=new Array("باغچه ","4578"),a[17]=new Array("خورخوره ","4579"),a[18]=new Array("کاولان علیا ","4580"),a[19]=new Array("سیاقول علیا ","4581"),a[20]=new Array("اگریقاش ","4582"),a[21]=new Array("اوزوندره علیا ","4583"),a[22]=new Array("یکشوه ","4584"),a[23]=new Array("جوانمرد ","4585"),a[24]=new Array("اغتطر ","4586"),a[25]=new Array("سیمینه ","4587"),a[26]=new Array("رحیمخان ","4588"),a[27]=new Array("گلتپه قورمیش ","4589"),a[28]=new Array("سلماش ","4590"),a[29]=new Array("اسلام آباد ","4591"),a[30]=new Array("بیوران سفلی ","4592"),a[31]=new Array("زمزیران ","4593"),a[32]=new Array("ربط ","4594"),a[33]=new Array("کشاورز (اقبال) ","4595"),a[34]=new Array("ملا شهاب الدین ","4596"),a[35]=new Array("للکلو ","4597"),a[36]=new Array("بکتاش ","4598"),a[37]=new Array("چهاربرج قدیم ","4599"),a[38]=new Array("گوگ تپه خالصه ","4600"),a[39]=new Array("تک آغاج ","4601"),a[40]=new Array("هاچاسو ","4602"),a[41]=new Array("هولاسو ","4603"),a[42]=new Array("قوزلوی افشار ","4604"),a[43]=new Array("محمودآباد ","4605"),a[44]=new Array("الیچین ","4606"),a[45]=new Array("حیدرباغی ","4607"),a[46]=new Array("حمزه قاسم ","4608"),a[47]=new Array("اوغولبیگ ","4609"),a[48]=new Array("دورباش ","4610"),a[49]=new Array("اقابیگ ","4611"),a[50]=new Array("احمدآبادسفلی ","4612"),
|
3 |
+
a[51]=new Array("باروق ","4613"),a[52]=new Array("سیلوانا ","3707"),a[53]=new Array("قوشچی ","3708"),a[54]=new Array("نقده ","3709"),a[55]=new Array("ارومیه ","3533"),a[56]=new Array("سیلوه ","3534"),a[57]=new Array("خوی ","3535"),a[58]=new Array("مهاباد ","3536"),a[59]=new Array("اشنویه ","3057"),a[60]=new Array("پیرانشهر ","3058"),a[61]=new Array("جلدیان ","3059"),a[62]=new Array("ایواوغلی ","3060"),a[63]=new Array("دیزجدیز ","3061"),a[64]=new Array("فیرورق ","3062"),a[65]=new Array("قره ضیاء الدین ـ چایپاره ","3063"),a[66]=new Array("ماکو ","3064"),a[67]=new Array("سیه چشمه ـ چالدران ","3065"),a[68]=new Array("سلماس ","3066"),a[69]=new Array("تازه شهر ","3067"),a[70]=new Array("گوگ تپه ","3068"),a[71]=new Array("کتیکه ","3069"),a[72]=new Array("بوکان ","3070"),a[73]=new Array("سردشت ","3071"),a[74]=new Array("میاندوآب ","3072"),a[75]=new Array("شاهین دژ ","3073"),a[76]=new Array("تکاب ","3074"),a[77]=new Array("میاوق ","2913"),a[78]=new Array("ایبلو ","2914"),a[79]=new Array("دستجرد ","2915"),a[80]=new Array("نوشین شهر ","2916"),a[81]=new Array("طلا تپه ","2917"),a[82]=new Array("راژان ","2918"),a[83]=new Array("هاشم آباد ","2919"),a[84]=new Array("دیزج ","2920"),a[85]=new Array("زیوه ","2921"),a[86]=new Array("توئی ","2922"),a[87]=new Array("موانا ","2923"),a[88]=new Array("قره باغ ","2924"),a[89]=new Array("بهله ","2925"),a[90]=new Array("امامکندی ","2926"),a[91]=new Array("نازلو ","2927"),a[92]=new Array("سرو ","2928"),a[93]=new Array("کانسپی ","2929"),a[94]=new Array("ممکان ","2930"),a[95]=new Array("میرآباد ","2931"),a[96]=new Array("حسنلو ","2932"),a[97]=new Array("کهریز عجم ","2933"),a[98]=new Array("محمد یار ","2934"),a[99]=new Array("شیخ احمد ","2935"),a[100]=new Array("بیگی مقلعه ","2936"),a[101]=new Array("راهدانه ","2937"),a[102]=new Array("شاهوانه ","2938"),a[103]=new Array("نالوس ","2939"),a[104]=new Array("ده شمس بزرگ ","2940"),a[105]=new Array("گلاز ","2941"),a[106]=new Array("لولکان ","2942"),a[107]=new Array("سیاوان ","2943"),a[108]=new Array("کلهکین ","2944"),a[109]=new Array("شین آباد ","2945"),a[110]=new Array("چیانه ","2946"),a[111]=new Array("بیکوس ","2947"),a[112]=new Array("هنگاباد ","2948"),a[113]=new Array("گردکشانه ","2949"),a[114]=new Array("پسوه ","2950"),a[115]=new Array("ریگ آباد ","2951"),a[116]=new Array("احمد غریب ","2952"),a[117]=new Array("سیهباز ","2953"),a[118]=new Array("بیله وار ","2954"),a[119]=new Array("ولدیان ","2955"),a[120]=new Array("قوروق ","2956"),a[121]=new Array("هندوان ","2957"),a[122]=new Array("بدلان ","2958"),a[123]=new Array("بلسورسفلی ","2959"),a[124]=new Array("زورآباد ","2960"),a[125]=new Array("استران ","2961"),a[126]=new Array("قطور ","2962"),a[127]=new Array("شیرین بلاغی ","2963"),a[128]=new Array("مراکان ","2964"),a[129]=new Array("چورس ","2965"),a[130]=new Array("قورول علیا ","2966"),a[131]=new Array("بسطام ","2967"),a[132]=new Array("قرهتپه ","2968"),a[133]=new Array("ریحانلوی علیا ","2969"),a[134]=new Array("زاویه سفلی ","2970"),a[135]=new Array("آواجیق (کلیسا کندی) ","2971"),a[136]=new Array("بازرگان ","2972"),a[137]=new Array("قمقشلاق علیا ","2973"),a[138]=new Array("یولاگلدی ","2974"),a[139]=new Array("قرنقو ","2975"),a[140]=new Array("شوط ","2976"),a[141]=new Array("پلدشت ","2977"),a[142]=new Array("نازک علیا ","2978"),a[143]=new Array("حسنکندی ","2979"),a[144]=new Array("وردان ","2980"),a[145]=new Array("قرهقشلاق ","2981"),a[146]=new Array("تمر","2982");break;case"همدان":case"hamadan":case"hamdan":case"hamedan":a[1]=new Array("همدان ","3540"),a[2]=new Array("بهار ","3088"),a[3]=new Array("اسدآباد ","3089"),a[4]=new Array("کبودرآهنگ ","3090"),a[5]=new Array("فامنین ","3091"),a[6]=new Array("ملایر ","3092"),a[7]=new Array("تویسرکان ","3093"),a[8]=new Array("نهاوند ","3094"),a[9]=new Array("حسین آباد ","3126"),a[10]=new Array("گنبد ","3127"),a[11]=new Array("جورقان ","3128"),a[12]=new Array("پادگان قهرمان ","3129"),a[13]=new Array("همهکسی ","2705"),a[14]=new Array("صالح آباد ","2706"),a[15]=new Array("پرلوک ","2707"),a[16]=new Array("عاشوری ","2708"),a[17]=new Array("مهاجران ","2709"),a[18]=new Array("ویرایی ","2710"),a[19]=new Array("مریانج ","2711"),a[20]=new Array("جنت آباد ","2712"),a[21]=new Array("موسی آباد ","2713"),a[22]=new Array("چنارسفلی ","2714"),a[23]=new Array("چنارعلیا ","2715"),a[24]=new Array("اجین ","2716"),a[25]=new Array("طویلان سفلا ","2717"),a[26]=new Array("کوریجان ","2718"),a[27]=new Array("کوهین ","2719"),a[28]=new Array("قهوردسفلی ","2720"),a[29]=new Array("اکنلو ","2721"),a[30]=new Array("شیرین سو ","2722"),a[31]=new Array("گل تپه ","2723"),a[32]=new Array("داقداق آباد ","2724"),a[33]=new Array("قهاوند ","2725"),a[34]=new Array("تجرک ","2726"),a[35]=new Array("کوزره ","2727"),a[36]=new Array("چانگرین ","2728"),a[37]=new Array("دمق ","2729"),a[38]=new Array("رزن ","2730"),a[39]=new Array("قروه درجزین ","2731"),a[40]=new Array("ازناو ","2732"),a[41]=new Array("جوزان ","2733"),a[42]=new Array("زنگنه ","2734"),a[43]=new Array("سامن ","2735"),a[44]=new Array("اورزمان ","2736"),a[45]=new Array("جوکار ","2737"),a[46]=new Array("اسلام آباد ","2738"),a[47]=new Array("جعفریه ","2739"),a[48]=new Array("سرکان ","2740"),a[49]=new Array("میانده ","2741"),a[50]=new Array("فرسنج ","2742"),a[51]=new Array("ولاشجرد ","2743"),a[52]=new Array("اشتران ","2744"),a[53]=new Array("باباپیر ","2745"),a[54]=new Array("جهان آباد ","2746"),a[55]=new Array("باباقاسم ","2747"),a[56]=new Array("بابارستم ","2748"),a[57]=new Array("گیان ","2749"),a[58]=new Array("دهفول ","2750"),a[59]=new Array("فیروزان ","2751"),a[60]=new Array("شهرک صنعتی ","2752"),a[61]=new Array("پایگاه نوژه ","2753"),a[62]=new Array("علیصدر ","2754"),a[63]=new Array("زند ","2755"),a[64]=new Array("ازندریان ","2756"),a[65]=new Array("خزل ","2757"),a[66]=new Array("لالجین ","4703"),a[67]=new Array("دینارآباد","4704");break;case"کردستان":case"kurdistan":case"kordistan":case"kurdestan":case"kordestan":a[1]=new Array("شویشه ","5604"),a[2]=new Array("شاهین ","3130"),a[3]=new Array("طای ","3131"),a[4]=new Array("گازرخانی ","3132"),a[5]=new Array("نشورسفلی ","3133"),a[6]=new Array("شیروانه ","3134"),a[7]=new Array("خامسان ","3135"),a[8]=new Array("موچش ","3136"),a[9]=new Array("شریف آباد ","3137"),a[10]=new Array("کوله ","3138"),a[11]=new Array("هزارکانیان ","3139"),a[12]=new Array("زرینه ","3140"),a[13]=new Array("گورباباعلی ","3141"),a[14]=new Array("گاوشله ","3142"),a[15]=new Array("حزکه ","3143"),a[16]=new Array("یاسوکند ","3144"),a[17]=new Array("توپاغاج ","3145"),a[18]=new Array("اغبلاغ طفامین ","3146"),a[19]=new Array("باباشارنی ","3147"),a[20]=new Array("خسروآباد ","3148"),a[21]=new Array("جعفرآباد ","3149"),a[22]=new Array("دلبران ","3150"),a[23]=new Array("دزج ","3151"),a[24]=new Array("کانی گنجی ","3152"),a[25]=new Array("بلبان آباد ","3153"),a[26]=new Array("دهگلان ","3154"),a[27]=new Array("قروچای ","3155"),a[28]=new Array("سریش آباد ","3156"),a[29]=new Array("نی ","3157"),a[30]=new Array("بردهرشه ","3158"),a[31]=new Array("چناره ","3159"),a[32]=new Array("پیرخفران ","3160"),a[33]=new Array("بیساران ","3161"),a[34]=new Array("سروآباد ","3162"),a[35]=new Array("اورامانتخت ","3163"),a[36]=new Array("سرا ","3164"),a[37]=new Array("گلتپه ","3165"),a[38]=new Array("تیلکو ","3166"),a[39]=new Array("صاحب ","3167"),a[40]=new Array("خورخوره ","3168"),a[41]=new Array("کسنزان ","3169"),a[42]=new Array("میرهده ","3170"),a[43]=new Array("ننور ","3171"),a[44]=new Array("بوئین سفلی ","3172"),a[45]=new Array("َآرمرده ","3173"),a[46]=new Array("بوالحسن ","3174"),a[47]=new Array("کانی سور ","3175"),a[48]=new Array("کوخان ","3176"),a[49]=new Array("شوی ","3177"),a[50]=new Array("کامیاران ","3095"),a[51]=new Array("دیواندره ","3096"),a[52]=new Array("بیجار ","3097"),a[53]=new Array("قروه ","3098"),a[54]=new Array("مریوان ","3099"),a[55]=new Array("سقز ","3100"),a[56]=new Array("بانه ","3101"),a[57]=new Array("سنندج","3541");break;case"کرمانشاه":case"kermanshah":a[1]=new Array("تازه آباد ـ ثلاث باباجانی ","4705"),a[2]=new Array("نسار دیره ","4706"),a[3]=new Array("سرمست(گواور) ","4707"),a[4]=new Array("تپهرش ","4708"),a[5]=new Array("خسروی ","4709"),a[6]=new Array("نفت شهر ","4710"),a[7]=new Array("سومار ","4711"),a[8]=new Array("گیلانغرب ","4712"),a[9]=new Array("چله ","4713"),a[10]=new Array("قیلان ","4714"),a[11]=new Array("باینگان ","4715"),a[12]=new Array("نوسود ","4716"),a[13]=new Array("نودشه ","4717"),a[14]=new Array("روانسر ","4718"),a[15]=new Array("دولت آباد ","4719"),a[16]=new Array("جوانرود ","4720"),a[17]=new Array("میرآباد ","4721"),a[18]=new Array("کرمانشاه ","3542"),a[19]=new Array("هرسین ","3102"),a[20]=new Array("کنگاور ","3103"),a[21]=new Array("سنقر ","3104"),a[22]=new Array("اسلام آباد غرب ","3105"),a[23]=new Array("سرپل ذهاب ","3106"),a[24]=new Array("قصرشیرین ","3107"),a[25]=new Array("پاوه ","3108"),a[26]=new Array("هفت اشیان ","3178"),a[27]=new Array("هلشی ","3179"),a[28]=new Array("دوردشت ","3180"),a[29]=new Array("سنقرآباد ","3181"),a[30]=new Array("بیستون ","3182"),a[31]=new Array("جعفرآباد(گاکیه) ","3183"),a[32]=new Array("مرزبانی ","3184"),a[33]=new Array("فش ","3185"),a[34]=new Array("فرامان ","3186"),a[35]=new Array("سلطان آباد ","3187"),a[36]=new Array("صحنه ","3188"),a[37]=new Array("قزوینه ","3189"),a[38]=new Array("دهلقین ","3190"),a[39]=new Array("درکه ","3191"),a[40]=new Array("باوله ","3192"),a[41]=new Array("گردکانه علیا ","3193"),a[42]=new Array("اگاه علیا ","3194"),a[43]=new Array("سطر ","3195"),a[44]=new Array("کیونان ","2758"),a[45]=new Array("کرگسار ","2759"),a[46]=new Array("کندوله ","2760"),a[47]=new Array("زاوله علیا ","2761"),a[48]=new Array("حمیل ","2762"),a[49]=new Array("ریجاب ","2763"),a[50]=new Array("کرندغرب ـ دالاهو ","2764"),a[51]=new Array("گهواره ","2765"),a[52]=new Array("کوزران ","2766"),a[53]=new Array("قلعه شیان ","2767"),a[54]=new Array("سرفیروز آباد ","2768"),a[55]=new Array("رباط ","2769"),a[56]=new Array("حسن آباد ","2770"),a[57]=new Array("سراب ذهاب ","2771"),a[58]=new Array("ترک ویس ","2772"),a[59]=new Array("ازگله","2773");break;case"لرستان":case"lorestan":a[1]=new Array("نورآباد ـ دلفان ","3109"),a[2]=new Array("کوهدشت ","3110"),a[3]=new Array("پل دختر ","3111"),a[4]=new Array("الیگودرز ","3112"),a[5]=new Array("ازنا ","3113"),a[6]=new Array("دورود ","3114"),a[7]=new Array("الشتر ـ سلسله ","3115"),a[8]=new Array("خرم آباد ","3543"),a[9]=new Array("بروجرد ","3544"),a[10]=new Array("ماسور ","4722"),a[11]=new Array("چغلوندی ","4723"),a[12]=new Array("برخوردار ","4724"),a[13]=new Array("فرهادآباد ","4725"),a[14]=new Array("دمباغ ","4726"),a[15]=new Array("کهریزوروشت ","4727"),a[16]=new Array("چشمه کوزان ","4728"),a[17]=new Array("هفت چشمه ","4729"),a[18]=new Array("تقی آباد ","4730"),a[19]=new Array("خوشناموند ","4731"),a[20]=new Array("اشتره گل گل ","4732"),a[21]=new Array("چقابل ","4733"),a[22]=new Array("سوری ","4734"),a[23]=new Array("کونانی ","4735"),a[24]=new Array("گراب ","4736"),a[25]=new Array("درب گنبد ","4737"),a[26]=new Array("پاعلم ","4738"),a[27]=new Array("واشیان نصیرتپه ","4739"),a[28]=new Array("چشمک زیرتنگ ","4740"),a[29]=new Array("افرینه ","4741"),a[30]=new Array("معمولان ","4742"),a[31]=new Array("میان راهان ","4743"),a[32]=new Array("شوراب سفلی ","4744"),a[33]=new Array("شاهپورآباد ","4745"),a[34]=new Array("چمن سلطان ","4746"),a[35]=new Array("کیزاندره ","4747"),a[36]=new Array("بزنوید ","4748"),a[37]=new Array("شول آباد ","4749"),a[38]=new Array("حیه ","4750"),a[39]=new Array("مرگسر ","4751"),a[40]=new Array("مومن آباد ","4752"),a[41]=new Array("رازان ","4753"),a[42]=new Array("سیاه گوشی ","4754"),a[43]=new Array("زاغه ","4755"),a[44]=new Array("سراب دوره ","4756"),a[45]=new Array("چاه ذوالفقار ","4757"),a[46]=new Array("چمپلک ","4758"),a[47]=new Array("ژان ","4759"),a[48]=new Array("کاغه شمالی ","4760"),a[49]=new Array("چالان چولان ","4761"),a[50]=new Array("سپیددشت ","4762"),a[51]=new Array("چمسنگر ","4763"),a[52]=new Array("تنگ هفت ","4764"),a[53]=new Array("حکومتی ","4765"),a[54]=new Array("سیاهپوش ","4766"),a[55]=new Array("ده رحیم ","4767"),a[56]=new Array("فیروزآباد ","4768"),a[57]=new Array("اشترینان ","4769"),a[58]=new Array("بندیزه ","4770"),a[59]=new Array("دره گرگ","4771");break;case"بوشهر":case"bushehr":a[1]=new Array("بوشهر ","3547"),a[2]=new Array("بندرگناوه ","3721"),a[3]=new Array("خورموج ـ دشتی ","3722"),a[4]=new Array("اهرم ـ تنگستان ","3723"),a[5]=new Array("برازجان ـ دشتستان ","3724"),a[6]=new Array("نخل تقی ","3725"),a[7]=new Array("عالی شهر ","4886"),a[8]=new Array("بندرریگ ","4887"),a[9]=new Array("چهارروستائی ","4888"),a[10]=new Array("شول ","4889"),a[11]=new Array("بندردیلم ","4890"),a[12]=new Array("امام حسن ","4891"),a[13]=new Array("چغارک ","4892"),a[14]=new Array("عسلویه ","4893"),a[15]=new Array("بادوله ","4894"),a[16]=new Array("شنبه ","4895"),a[17]=new Array("کاکی ","4896"),a[18]=new Array("جزیره خارک ","4897"),a[19]=new Array("دلوار ","4898"),a[20]=new Array("بنهگز ","4899"),a[21]=new Array("آباد ","4900"),a[22]=new Array("بردخون ","4901"),a[23]=new Array("بندردیر ","4902"),a[24]=new Array("ابدان ","4903"),a[25]=new Array("ریز ","4904"),a[26]=new Array("بندرکنگان ","4905"),a[27]=new Array("جم ","4906"),a[28]=new Array("آبگرم ","4907"),a[29]=new Array("دالکی ","4908"),a[30]=new Array("شبانکاره ","4909"),a[31]=new Array("آبپخش ","4910"),a[32]=new Array("سعدآباد ","4911"),a[33]=new Array("وحدتیه ","4912"),a[34]=new Array("تنگ ارم ","4913"),a[35]=new Array("کلمه ","4914"),a[36]=new Array("سیراف","5620");break;case"کرمان":case"kerman":a[1]=new Array("کرمان ","3548"),a[2]=new Array("رفسنجان ","3549"),a[3]=new Array("سیرجان ","3550"),a[4]=new Array("ماهان ","3729"),a[5]=new Array("گلباف ","3730"),a[6]=new Array("راور ","3731"),a[7]=new Array("بم ","3732"),a[8]=new Array("بروات ","3733"),a[9]=new Array("راین ","3734"),a[10]=new Array("محمدآباد ـ ریگان ","3735"),a[11]=new Array("سرچشمه ","3736"),a[12]=new Array("انار ","3737"),a[13]=new Array("شهربابک ","3738"),a[14]=new Array("زرند ","3739"),a[15]=new Array("کیان شهر ","3740"),a[16]=new Array("کوهبنان ","3741"),a[17]=new Array("چترود ","3742"),a[18]=new Array("پاریز ","3743"),a[19]=new Array("بردسیر ","3744"),a[20]=new Array("بافت ","3745"),a[21]=new Array("جیرفت ","3746"),a[22]=new Array("عنبرآباد ","3747"),a[23]=new Array("کهنوج ","3748"),a[24]=new Array("منوجان ","3749"),a[25]=new Array("محی آباد ","5605"),a[26]=new Array("ده بالا ","4936"),a[27]=new Array("حسین آبادخان ","4937"),a[28]=new Array("جوپار ","4938"),a[29]=new Array("باغین ","4939"),a[30]=new Array("اختیارآباد ","4940"),a[31]=new Array("زنگی آباد ","4941"),a[32]=new Array("جوشان ","4942"),a[33]=new Array("سیرچ ","4943"),a[34]=new Array("اندوهجرد ","4944"),a[35]=new Array("شهداد ","4945"),a[36]=new Array("کشیت ","4946"),a[37]=new Array("همت آباد ","4947"),a[38]=new Array("باغهوتک ","4948"),a[39]=new Array("خورند ","4949"),a[40]=new Array("فیض آباد ","4950"),a[41]=new Array("دریجان ","4951"),a[42]=new Array("نرماشیر ","4952"),a[43]=new Array("فهرج ","4953"),a[44]=new Array("دهنوگنیگی ","4954"),a[45]=new Array("برج معاذ ","4955"),a[46]=new Array("قلعه خان ","4956"),a[47]=new Array("نظام شهر ","4957"),a[48]=new Array("خانه خاتون ","4958"),a[49]=new Array("ابارق ","4959"),a[50]=new Array("عبدالصمدیه ","4960"),a[51]=new Array("گروه ","4961"),a[52]=new Array("گزک ","4962"),a[53]=new Array("حسین آباد ","4963"),a[54]=new Array("دهنه عباسی ","4964"),a[55]=new Array("تهرود ","4965"),a[56]=new Array("میرآباد ","4966"),a[57]=new Array("داوران ","4967"),a[58]=new Array("خنامان ","4968"),a[59]=new Array("کبوترخان ","4969"),a[60]=new Array("هرمزآباد ","4970"),a[61]=new Array("کشکوئیه ","4971"),a[62]=new Array("گلشن ","4972"),a[63]=new Array("فردوسیه ","4973"),a[64]=new Array("بهجت آباد ","4974"),a[65]=new Array("بهرمان ","4975"),a[66]=new Array("جوادیه فلاح ","4976"),a[67]=new Array("میمند ","4977"),a[68]=new Array("برفه ","4978"),a[69]=new Array("خورسند ","4979"),a[70]=new Array("خبر ","4980"),a[71]=new Array("کهرخ ","4981"),a[72]=new Array("جوزم ","4982"),a[73]=new Array("دهج ","4983"),a[74]=new Array("دشتخاک ","4984"),a[75]=new Array("برفوئیه ","4985"),a[76]=new Array("حتکن ","4986"),a[77]=new Array("ریحان ","4987"),a[78]=new Array("جرجافک ","4988"),a[79]=new Array("حصین ","4989"),a[80]=new Array("یزدانشهر ","4990"),a[81]=new Array("شعبجره ","4991"),a[82]=new Array("ناچو ","4992"),a[83]=new Array("سریز ","4993"),a[84]=new Array("خانوک ","4994"),a[85]=new Array("علی آبادسفلی ","4995"),a[86]=new Array("جور ","4996"),a[87]=new Array("هوتک ","4997"),a[88]=new Array("کهنوج( مغزآباد) ","4998"),a[89]=new Array("کاظم آباد ","4999"),a[90]=new Array("هجدک ","5000"),a[91]=new Array("حرجند ","5001"),a[92]=new Array("نجف شهر ","5002"),a[93]=new Array("بلورد ","5003"),a[94]=new Array("ملک اباد ","5004"),a[95]=new Array("حاجی آبادرضوان ","5005"),a[96]=new Array("عمادآباد ","5006"),a[97]=new Array("زیدآباد ","5007"),a[98]=new Array("سعادت آباد ","5008"),a[99]=new Array("دولت ابادتنگوئیه ","5009"),a[100]=new Array("نگار ","5010"),a[101]=new Array("گلزار ","5011"),a[102]=new Array("لاله زار ","5012"),a[103]=new Array("قلعه عسگر ","5013"),a[104]=new Array("مومن آباد ","5014"),a[105]=new Array("برین ","5015"),a[106]=new Array("کمال آباد ","5016"),a[107]=new Array("امیرآباد ","5017"),a[108]=new Array("بزنجان ","5018"),a[109]=new Array("رابر ","5019"),a[110]=new Array("دهسرد(پتکان) ","5020"),a[111]=new Array("ارزوئیه ","5021"),a[112]=new Array("جبالبارز ","5022"),a[113]=new Array("دولت اباداسفن ","5023"),a[114]=new Array("بهرآسمان ","5024"),a[115]=new Array("درب بهشت ","5025"),a[116]=new Array("دولت ابادسکوچ ","5026"),a[117]=new Array("گور ","5027"),a[118]=new Array("رضی آباد ","5028"),a[119]=new Array("هیحان علیا ","5029"),a[120]=new Array("دهانه گمرکان ","5030"),a[121]=new Array("قلعه گنج ","5031"),a[122]=new Array("مردهک ","5032"),a[123]=new Array("دوساری ","5033"),a[124]=new Array("حسین آبادجدید ","5034"),a[125]=new Array("بلوک ","5035"),a[126]=new Array("رودبار ","5036"),a[127]=new Array("نودژ ","5037"),a[128]=new Array("فاریاب ","5038"),a[129]=new Array("کیورآباد ","5039"),a[130]=new Array("رائین قلعه ","5040"),a[131]=new Array("سرخ قلعه ","5041"),a[132]=new Array("رمشک ","5042"),a[133]=new Array("حیدرآباد ","5043"),a[134]=new Array("خیرآباد","5044");break;case"هرمزگان":case"hormozgān":case"hormozgan":a[1]=new Array("بندرخمیر ","3750"),a[2]=new Array("کیش ","3751"),a[3]=new Array("قشم ","3752"),a[4]=new Array("بستک ","3753"),a[5]=new Array("بندر لنگه ","3754"),a[6]=new Array("میناب ","3755"),a[7]=new Array("دهبارز ـ رودان ","3756"),a[8]=new Array("ایسین ","5045"),a[9]=new Array("پل شرقی ","5046"),a[10]=new Array("فین ","5047"),a[11]=new Array("سیاهو ","5048"),a[12]=new Array("فارغان ","5049"),a[13]=new Array("باغات ","5050"),a[14]=new Array("حاجی آباد ","5051"),a[15]=new Array("خورگو ","5052"),a[16]=new Array("شمیل ","5053"),a[17]=new Array("حسن لنگی ","5054"),a[18]=new Array("سیریک ","5055"),a[19]=new Array("گونمردی ","5056"),a[20]=new Array("گروک سفلی ","5057"),a[21]=new Array("گوهرت ","5058"),a[22]=new Array("درگهان ","5059"),a[23]=new Array("سوزا ","5060"),a[24]=new Array("هرمز ","5061"),a[25]=new Array("جزیرهلارک ","5062"),a[26]=new Array("جزیره هنگام ","5063"),a[27]=new Array("جزیره سیری ","5064"),a[28]=new Array("ابوموسی ","5065"),a[29]=new Array("پدل ","5066"),a[30]=new Array("کنگ ","5067"),a[31]=new Array("دژگان ","5068"),a[32]=new Array("رویدر ","5069"),a[33]=new Array("دهنگ ","5070"),a[34]=new Array("جناح ","5071"),a[35]=new Array("کمشک ","5072"),a[36]=new Array("گزیر ","5073"),a[37]=new Array("مغویه ","5074"),a[38]=new Array("چارک ","5075"),a[39]=new Array("دشتی ","5076"),a[40]=new Array("پارسیان ","5077"),a[41]=new Array("جزیره لاوان ","5078"),a[42]=new Array("جاسک ","5079"),a[43]=new Array("بندر ","5080"),a[44]=new Array("سندرک ","5081"),a[45]=new Array("درپهن ","5082"),a[46]=new Array("جگدان ","5083"),a[47]=new Array("گوهران ","5084"),a[48]=new Array("سردشت ـ بشاگرد ","5085"),a[49]=new Array("گرهون ","5506"),a[50]=new Array("جغین ","5507"),a[51]=new Array("زیارت علی ","5508"),a[52]=new Array("ماشنگی ","5509"),a[53]=new Array("گوربند ","5510"),a[54]=new Array("تیاب ","5511"),a[55]=new Array("بندزک کهنه ","5512"),a[56]=new Array("هشتبندی ","5513"),a[57]=new Array("بندرعباس","3551");break;case"چهارمحال و بختیاری":case"chahar mahaal and bakhtiari":a[1]=new Array("فرخ شهر ","2996"),a[2]=new Array("دزک ","2997"),a[3]=new Array("هفشجان ","2998"),a[4]=new Array("هارونی ","2999"),a[5]=new Array("سامان ","3000"),a[6]=new Array("فارسان ","3001"),a[7]=new Array("بروجن ","3002"),a[8]=new Array("اردل ","3003"),a[9]=new Array("لردگان ","3004"),a[10]=new Array("شهرکرد ","3557"),a[11]=new Array("کیان ","5219"),a[12]=new Array("طاقانک ","5220"),a[13]=new Array("خراجی ","5221"),a[14]=new Array("دستنائ ","5222"),a[15]=new Array("شلمزار ـ کیار ","5223"),a[16]=new Array("گهرو ","5224"),a[17]=new Array("سورشجان ","5225"),a[18]=new Array("مرغملک ","5226"),a[19]=new Array("سودجان ","5227"),a[20]=new Array("چالشتر ","5228"),a[21]=new Array("شورآب صغیر ","5229"),a[22]=new Array("هوره ","5230"),a[23]=new Array("مارکده ","5231"),a[24]=new Array("نافچ ","5232"),a[25]=new Array("وردنجان ","5233"),a[26]=new Array("بن ","5234"),a[27]=new Array("بردنجان ","5235"),a[28]=new Array("باباحیدر ","5236"),a[29]=new Array("میهه ","5237"),a[30]=new Array("چلگرد ـ کوهرنگ ","5238"),a[31]=new Array("شهریاری ","5239"),a[32]=new Array("جونقان ","5240"),a[33]=new Array("صمصامی ","5241"),a[34]=new Array("تلورد ","5242"),a[35]=new Array("نقنه ","5243"),a[36]=new Array("فرادنبه ","5244"),a[37]=new Array("سفیددشت ","5245"),a[38]=new Array("بلداجی ","5246"),a[39]=new Array("اورگان ","5247"),a[40]=new Array("گندمان ","5248"),a[41]=new Array("امام قیس ","5249"),a[42]=new Array("ناغان ","5250"),a[43]=new Array("دوپلان ","5251"),a[44]=new Array("دورک ","5252"),a[45]=new Array("سرخون ","5253"),a[46]=new Array("عزیزآباد ","5254"),a[47]=new Array("دشتک ","5255"),a[48]=new Array("سرمور ","5256"),a[49]=new Array("ارمندعلیا ","5257"),a[50]=new Array("آلونی ","5258"),a[51]=new Array("مال خلیفه ","5259"),a[52]=new Array("چمنبید ","5260"),a[53]=new Array("سردشت ","5261"),a[54]=new Array("گرگر ","5262"),a[55]=new Array("منجبرآفتاب","5263");break;case"یزد":case"yazd":a[1]=new Array("حمیدیا ","5610"),a[2]=new Array("فراغه ","5264"),a[3]=new Array("تیرجرد ","5265"),a[4]=new Array("مهردشت ","5266"),a[5]=new Array("اسفندآباد ","5267"),a[6]=new Array("شاهدیه ","5268"),a[7]=new Array("فهرج ","5269"),a[8]=new Array("رستاق ","5270"),a[9]=new Array("فجر ","5271"),a[10]=new Array("ندوشن ","5272"),a[11]=new Array("احمدآباد ","5273"),a[12]=new Array("عقدائ ","5274"),a[13]=new Array("نارستان ","5275"),a[14]=new Array("زرین ","5276"),a[15]=new Array("رباطات ","5277"),a[16]=new Array("بفروئیه ","5278"),a[17]=new Array("شهیدیه ","5279"),a[18]=new Array("اسفیچ ","5280"),a[19]=new Array("سبزدشت ","5281"),a[20]=new Array("مبارکه ","5282"),a[21]=new Array("بهاباد ","5283"),a[22]=new Array("کوشک ","5284"),a[23]=new Array("بنتان ","5285"),a[24]=new Array("جلگه ","5286"),a[25]=new Array("تنگ چنار ","5287"),a[26]=new Array("میانکوه ","5288"),a[27]=new Array("ارنان ","5289"),a[28]=new Array("بهادران ","5290"),a[29]=new Array("مروست ","5291"),a[30]=new Array("فتح آباد ","5292"),a[31]=new Array("پیشکوه ","5293"),a[32]=new Array("نصرآباد ","5294"),a[33]=new Array("علی آباد ","5295"),a[34]=new Array("نیر ","5296"),a[35]=new Array("شیرکوه ","5297"),a[36]=new Array("بخگاریزات ","5298"),a[37]=new Array("دهشیر ","5299"),a[38]=new Array("محمد آباد ","5300"),a[39]=new Array("خضر آباد ","5301"),a[40]=new Array("رباط پشت بادام ","5302"),a[41]=new Array("خرانق ","5303"),a[42]=new Array("ساغند ","5304"),a[43]=new Array("زارچ ","5305"),a[44]=new Array("مهدی آباد ","5306"),a[45]=new Array("احمدآبادمشیر ","5307"),a[46]=new Array("شرب العین ","5308"),a[47]=new Array("قوام آباد ","5309"),a[48]=new Array("خویدک ","5310"),a[49]=new Array("هرات ـ خاتم ","5311"),a[50]=new Array("یزد ","3558"),a[51]=new Array("اشکذر ـ صدوق ","3007"),a[52]=new Array("اردکان ","3008"),a[53]=new Array("میبد ","3009"),a[54]=new Array("بافق ","3010"),a[55]=new Array("مهریز ","3011"),a[56]=new Array("تفت ","3012"),a[57]=new Array("ابرکوه","3005");break;case"سیستان و بلوچستان":case"sistan and baluchistan":case"sistan and baluchestan":a[1]=new Array("نصرت آباد ","3046"),a[2]=new Array("حاجی آباد ","3047"),a[3]=new Array("میرجاوه ","3048"),a[4]=new Array("دوست محمد ـ هیرمند ","3049"),a[5]=new Array("زابل ","3050"),a[6]=new Array("زهک ","3051"),a[7]=new Array("خواجه احمد ","3052"),a[8]=new Array("خاش ","3053"),a[9]=new Array("سرباز ","3054"),a[10]=new Array("بمپور ","3055"),a[11]=new Array("سراوان ","3056"),a[12]=new Array("سوران ـ سیب سوران ","3782"),a[13]=new Array("چابهار ","3783"),a[14]=new Array("کنارک ","3784"),a[15]=new Array("نیک شهر ","3785"),a[16]=new Array("زاهدان ","3564"),a[17]=new Array("ایرانشهر ","3565"),a[18]=new Array("نوک اباد ","5412"),a[19]=new Array("حرمک ","5413"),a[20]=new Array("پاسگاه تلسیاه ","5414"),a[21]=new Array("محمدابادکورین ","5415"),a[22]=new Array("گلوگاه ","5416"),a[23]=new Array("گردجنگل ","5417"),a[24]=new Array("میل هفتادودو ","5418"),a[25]=new Array("انده ","5419"),a[26]=new Array("تیمن ","5420"),a[27]=new Array("لادیزعلیا ","5421"),a[28]=new Array("کچهرود ","5422"),a[29]=new Array("دیزوک ","5423"),a[30]=new Array("قنات عیسی اباد ","5424"),a[31]=new Array("سیادک ","5425"),a[32]=new Array("خمک ","5426"),a[33]=new Array("تحت عدالت ","5427"),a[34]=new Array("برج میرگل ","5428"),a[35]=new Array("جهان ابادعلیا ","5429"),a[36]=new Array("پکک ","5430"),a[37]=new Array("جانی اباد ","5431"),a[38]=new Array("ادیمی ","5432"),a[39]=new Array("تیموراباد ","5433"),a[40]=new Array("دولت اباد ","5434"),a[41]=new Array("لوتک ","5435"),a[42]=new Array("سکوهه ","5436"),a[43]=new Array("محمدآباد ","5437"),a[44]=new Array("بنجار ","5438"),a[45]=new Array("جزینک ","5439"),a[46]=new Array("قلعه نو ","5440"),a[47]=new Array("محمد شاهکرم ","5441"),a[48]=new Array("سیاهسر ","5442"),a[49]=new Array("ژالهای ","5443"),a[50]=new Array("کرباسک ","5444"),a[51]=new Array("نوراباد ","5445"),a[52]=new Array("کارواندر ","5446"),a[53]=new Array("ناصراباد ","5447"),a[54]=new Array("بالاقلعه ایردگان ","5448"),a[55]=new Array("کمن ","5449"),a[56]=new Array("زیرگلدان ","5450"),a[57]=new Array("بیت اباد ","5451"),a[58]=new Array("گوهرکوه ","5452"),a[59]=new Array("دهپابید ","5453"),a[60]=new Array("ناذیل ","5454"),a[61]=new Array("گوشه ","5455"),a[62]=new Array("سنگان ","5456"),a[63]=new Array("عشق آباد ","5457"),a[64]=new Array("افضل اباد ","5458"),a[65]=new Array("چانف ","5459"),a[66]=new Array("اسماعیل کلک ","5460"),a[67]=new Array("پارود ","5461"),a[68]=new Array("راسک ","5462"),a[69]=new Array("پیشین ","5463"),a[70]=new Array("ایرفشان ","5464"),a[71]=new Array("سرداب ","5465"),a[72]=new Array("اسپکه ","5466"),a[73]=new Array("پیپ ","5467"),a[74]=new Array("بنت ","5468"),a[75]=new Array("فنوج ","5469"),a[76]=new Array("گلمورتی ـ دلگان ","5470"),a[77]=new Array("هودیان ","5471"),a[78]=new Array("بزمان ","5472"),a[79]=new Array("کوشکوک ناهوک ","5473"),a[80]=new Array("محمدی ","5474"),a[81]=new Array("کلهگان(سردک) ","5475"),a[82]=new Array("جالق ","5476"),a[83]=new Array("سیرکان ","5477"),a[84]=new Array("اسفندک ","5478"),a[85]=new Array("کوهک ","5479"),a[86]=new Array("گشت ","5480"),a[87]=new Array("پسکو ","5481"),a[88]=new Array("رگنتگ ","5482"),a[89]=new Array("زابلی ","5483"),a[90]=new Array("هیدوچ ","5484"),a[91]=new Array("طیس ","5485"),a[92]=new Array("تلنگ ","5486"),a[93]=new Array("پلان ","5487"),a[94]=new Array("نگور ","5488"),a[95]=new Array("باهوکلات ","5489"),a[96]=new Array("پسابندر ","5490"),a[97]=new Array("پیرسهراب ","5491"),a[98]=new Array("پایگاه کنارک ","5492"),a[99]=new Array("کهیر هوتان ","5493"),a[100]=new Array("شهدای کهیر ","5494"),a[101]=new Array("زراباد ","5495"),a[102]=new Array("مسکوتان ","5496"),a[103]=new Array("کیتج ","5497"),a[104]=new Array("دستگرد ","5498"),a[105]=new Array("محنت ","5499"),a[106]=new Array("چاهان ","5500"),a[107]=new Array("هیمان ","5501"),a[108]=new Array("قصرقند ","5502"),a[109]=new Array("شگیم بالا ","5503"),a[110]=new Array("کشیک ","5504"),a[111]=new Array("ساربوک","5505");break;case"ایلام":case"ilam":a[1]=new Array("باکلکراب ","4772"),a[2]=new Array("جعفرآباد ","4773"),a[3]=new Array("شهرک شهید کشوری ","4774"),a[4]=new Array("چوار ","4775"),a[5]=new Array("حاجی بختیار ","4776"),a[6]=new Array("چمن سیدمحمد ","4777"),a[7]=new Array("شورابه ملک ","4778"),a[8]=new Array("کلان ","4779"),a[9]=new Array("زرنه ","4780"),a[10]=new Array("توحید ","4781"),a[11]=new Array("بلاوهتره سفلی ","4782"),a[12]=new Array("لومار ","4783"),a[13]=new Array("آسمان آباد ","4784"),a[14]=new Array("قنات آباد ","4785"),a[15]=new Array("شهرک سرنیک ","4786"),a[16]=new Array("پیازآباد ","4787"),a[17]=new Array("ایرج آباد ","4788"),a[18]=new Array("ارمو ","4789"),a[19]=new Array("چشمه شیرین ","4790"),a[20]=new Array("بدره ","4791"),a[21]=new Array("شهرک ولی عصر ","4792"),a[22]=new Array("انجیرهنیشه کبد ","4793"),a[23]=new Array("سراب باغ ","4794"),a[24]=new Array("مورموری ","4795"),a[25]=new Array("چمهندی ","4796"),a[26]=new Array("موسیان ","4797"),a[27]=new Array("بردی ","4798"),a[28]=new Array("میمه ","4799"),a[29]=new Array("پهله ","4800"),a[30]=new Array("عین خوش ","4801"),a[31]=new Array("دشت عباس ","4802"),a[32]=new Array("شهرک اسلامیه ","4803"),a[33]=new Array("صالح آباد ","4804"),a[34]=new Array("ارکواز ","4805"),a[35]=new Array("دولکبودخوشادل ","4806"),a[36]=new Array("یاریاب ","4807"),a[37]=new Array("ایلام ","3116"),a[38]=new Array("ایوان ","3117"),a[39]=new Array("سرابله ـ شیروان و چرداول ","3118"),a[40]=new Array("دره شهر ","3119"),a[41]=new Array("آبدانان ","3120"),a[42]=new Array("دهلران ","3121"),a[43]=new Array("مهران","3122");break;case"کهگیلویه و بویراحمد":case"kohgiluyeh and boyer-ahmad":case"kohgiluyeh and boyerahmad":a[1]=new Array("دهدشت ","3726"),a[2]=new Array("دوگنبد ","3727"),a[3]=new Array("یاسوج ","3728"),a[4]=new Array("سوق ","4915"),a[5]=new Array("لنده ","4916"),a[6]=new Array("لیکک ","4917"),a[7]=new Array("چرام ","4918"),a[8]=new Array("دیشموک ","4919"),a[9]=new Array("قلعه رئیسی ","4920"),a[10]=new Array("قلعه دختر ","4921"),a[11]=new Array("باباکلان ","4922"),a[12]=new Array("مظفرآباد ","4923"),a[13]=new Array("دیل ","4924"),a[14]=new Array("شاه بهرام ","4925"),a[15]=new Array("چاه تلخاب علیا ","4926"),a[16]=new Array("باشت ","4927"),a[17]=new Array("سربیشه ","4928"),a[18]=new Array("سپیدار ","4929"),a[19]=new Array("نقارخانه ","4930"),a[20]=new Array("گراب سفلی ","4931"),a[21]=new Array("موشمی علیا ","4932"),a[22]=new Array("میمند ","4933"),a[23]=new Array("مارگون ","4934"),a[24]=new Array("سیسخت ","4935"),a[25]=new Array("مادوان","5606");break;case"خراسان شمالی":case"khorasan - north":case"khorasan-north":a[1]=new Array("حصار گرمخانه ","5343"),a[2]=new Array("فاروج ","5324"),a[3]=new Array("بجنورد ","3560"),a[4]=new Array("جاجرم ","2880"),a[5]=new Array("قاضی ","2824"),a[6]=new Array("پیش قلعه ","2830"),a[7]=new Array("راز ","2831"),a[8]=new Array("سنخواست ","2826"),a[9]=new Array("شیروان ","2834"),a[10]=new Array("صفی آباد ","2895"),a[11]=new Array("اسفراین ","2892"),a[12]=new Array("گرمه ","3023"),a[13]=new Array("آشخانه ـ مانه و سلمقان ","3014"),a[14]=new Array("شوقان ","3015"),a[15]=new Array("درق ","3016"),a[16]=new Array("لوجلی","3017");break;case"خراسان جنوبی":case"khorasan - south":case"khorasan-south":a[1]=new Array("سه قلعه ","5402"),a[2]=new Array("قهستان ","5592"),a[3]=new Array("اسلامیه ","5593"),a[4]=new Array("زهان ","5391"),a[5]=new Array("خوسف ","5367"),a[6]=new Array("حاجی آباد ","5373"),a[7]=new Array("نیمبلوک ","5374"),a[8]=new Array("آیسک ","5375"),a[9]=new Array("اسدیه ـ درمیان ","5376"),a[10]=new Array("شوسف ","5383"),a[11]=new Array("خضری ","5389"),a[12]=new Array("سرایان ","5394"),a[13]=new Array("بیرجند ","3563"),a[14]=new Array("دشت بیاض ","2815"),a[15]=new Array("اسفدن ","2833"),a[16]=new Array("آرین شهر ","2891"),a[17]=new Array("طبس ","3006"),a[18]=new Array("مود ","3040"),a[19]=new Array("سر بیشه ","3041"),a[20]=new Array("نهبندان ","3042"),a[21]=new Array("قائن ـ قائنات ","3043"),a[22]=new Array("فردوس ","3044"),a[23]=new Array("بشرویه","3045");break;case"البرز":case"alborz":a[1]=new Array("کرج ","3351"),a[2]=new Array("اشتهارد ","3821"),a[3]=new Array("گلسار ","3850"),a[4]=new Array("نظرآباد ","3587"),
|
4 |
+
a[5]=new Array("هشتگرد ـ ساوجبلاغ ","3591"),a[14]=new Array("شهر جدید هشتگرد","5618"),a[6]=new Array("رباط کریم ","3620"),a[7]=new Array("مشکین شهر ","5611"),a[8]=new Array("محمدشهر ","5612"),a[9]=new Array("ماهیدشت ","5613"),a[10]=new Array("کمال شهر ","5614"),a[11]=new Array("صفادشت ","5615"),a[12]=new Array("فردوسیه ","5616"),a[13]=new Array("چهارباغ ","5617");break;default:a[0]=new Array(" ","0")}var e,n="";for(e in a)n+="<option>"+a[e][0]+"</option>";return n}
|
assets/js/jalali.date.picker.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
function mod(t,e){return t-e*Math.floor(t/e)}function leap_gregorian(t){return t%4==0&&!(t%100==0&&t%400!=0)}function gregorian_to_jd(t,e,a){return GREGORIAN_EPOCH-1+365*(t-1)+Math.floor((t-1)/4)+-Math.floor((t-1)/100)+Math.floor((t-1)/400)+Math.floor((367*e-362)/12+(2>=e?0:leap_gregorian(t)?-1:-2)+a)}function jd_to_gregorian(t){var e,a,i,s,r,n,c,o,h,d,u,l;return e=Math.floor(t-.5)+.5,a=e-GREGORIAN_EPOCH,i=Math.floor(a/146097),s=mod(a,146097),r=Math.floor(s/36524),n=mod(s,36524),c=Math.floor(n/1461),o=mod(n,1461),h=Math.floor(o/365),d=400*i+100*r+4*c+h,4!=r&&4!=h&&d++,u=e-gregorian_to_jd(d,1,1),l=e<gregorian_to_jd(d,3,1)?0:leap_gregorian(d)?1:2,month=Math.floor((12*(u+l)+373)/367),day=e-gregorian_to_jd(d,month,1)+1,new Array(d,month,day)}function leap_islamic(t){return 11>(11*t+14)%30}function islamic_to_jd(t,e,a){return a+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+ISLAMIC_EPOCH-1}function jd_to_islamic(t){var e,a,i;return t=Math.floor(t)+.5,e=Math.floor((30*(t-ISLAMIC_EPOCH)+10646)/10631),a=Math.min(12,Math.ceil((t-(29+islamic_to_jd(e,1,1)))/29.5)+1),i=t-islamic_to_jd(e,a,1)+1,new Array(e,a,i)}function leap_persian(t){return 682>682*((t-(t>0?474:473))%2820+474+38)%2816}function persian_to_jd(t,e,a){var i,s;return i=t-(t>=0?474:473),s=474+mod(i,2820),a+(7>=e?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(i/2820)+(PERSIAN_EPOCH-1)}function jd_to_persian(t){var e,a,i,s,r,n,c,o,h,d;return t=Math.floor(t)+.5,s=t-persian_to_jd(475,1,1),r=Math.floor(s/1029983),n=mod(s,1029983),1029982==n?c=2820:(o=Math.floor(n/366),h=mod(n,366),c=Math.floor((2134*o+2816*h+2815)/1028522)+o+1),e=c+2820*r+474,0>=e&&e--,d=t-persian_to_jd(e,1,1)+1,a=Math.ceil(186>=d?d/31:(d-6)/30),i=t-persian_to_jd(e,a,1)+1,new Array(e,a,i)}function HijriDate(t,e,a){function i(t){var e=jd_to_gregorian(islamic_to_jd(t[0],t[1]+1,t[2]));return e[1]--,e}function s(t){var e=jd_to_islamic(gregorian_to_jd(t[0],t[1]+1,t[2]));return e[1]--,e}function r(t){return t&&t.getGregorianDate&&(t=t.getGregorianDate()),n=new Date(t),n.setHours(n.getHours()>12?n.getHours()+2:0),(!n||"Invalid Date"==n||isNaN(n||!n.getDate()))&&(n=new Date),c=s([n.getFullYear(),n.getMonth(),n.getDate()]),this}var n,c;if(isNaN(parseInt(t))||isNaN(parseInt(e))||isNaN(parseInt(a)))r(t);else{var o=i([parseInt(t,10),parseInt(e,10),parseInt(a,10)]);r(new Date(o[0],o[1],o[2]))}this.getGregorianDate=function(){return n},this.setFullDate=r,this.setMonth=function(t){c[1]=t;var e=i(c);n=new Date(e[0],e[1],e[2]),c=s([e[0],e[1],e[2]])},this.setDate=function(t){c[2]=t;var e=i(c);n=new Date(e[0],e[1],e[2]),c=s([e[0],e[1],e[2]])},this.getFullYear=function(){return c[0]},this.getMonth=function(){return c[1]},this.getDate=function(){return c[2]},this.toString=function(){return c.join(",").toString()},this.getDay=function(){return n.getDay()},this.getHours=function(){return n.getHours()},this.getMinutes=function(){return n.getMinutes()},this.getSeconds=function(){return n.getSeconds()},this.getTime=function(){return n.getTime()},this.getTimeZoneOffset=function(){return n.getTimeZoneOffset()},this.getYear=function(){return c[0]%100},this.setHours=function(t){n.setHours(t)},this.setMinutes=function(t){n.setMinutes(t)},this.setSeconds=function(t){n.setSeconds(t)},this.setMilliseconds=function(t){n.setMilliseconds(t)}}function JalaliDate(t,e,a){function i(t){var e=0;t[1]<0&&(e=leap_persian(t[0]-1)?30:29,t[1]++);var a=jd_to_gregorian(persian_to_jd(t[0],t[1]+1,t[2])-e);return a[1]--,a}function s(t){var e=jd_to_persian(gregorian_to_jd(t[0],t[1]+1,t[2]));return e[1]--,e}function r(t){return t&&t.getGregorianDate&&(t=t.getGregorianDate()),n=new Date(t),n.setHours(n.getHours()>12?n.getHours()+2:0),(!n||"Invalid Date"==n||isNaN(n||!n.getDate()))&&(n=new Date),c=s([n.getFullYear(),n.getMonth(),n.getDate()]),this}var n,c;if(isNaN(parseInt(t))||isNaN(parseInt(e))||isNaN(parseInt(a)))r(t);else{var o=i([parseInt(t,10),parseInt(e,10),parseInt(a,10)]);r(new Date(o[0],o[1],o[2]))}this.getGregorianDate=function(){return n},this.setFullDate=r,this.setMonth=function(t){c[1]=t;var e=i(c);n=new Date(e[0],e[1],e[2]),c=s([e[0],e[1],e[2]])},this.setDate=function(t){c[2]=t;var e=i(c);n=new Date(e[0],e[1],e[2]),c=s([e[0],e[1],e[2]])},this.getFullYear=function(){return c[0]},this.getMonth=function(){return c[1]},this.getDate=function(){return c[2]},this.toString=function(){return c.join(",").toString()},this.getDay=function(){return n.getDay()},this.getHours=function(){return n.getHours()},this.getMinutes=function(){return n.getMinutes()},this.getSeconds=function(){return n.getSeconds()},this.getTime=function(){return n.getTime()},this.getTimeZoneOffset=function(){return n.getTimeZoneOffset()},this.getYear=function(){return c[0]%100},this.setHours=function(t){n.setHours(t)},this.setMinutes=function(t){n.setMinutes(t)},this.setSeconds=function(t){n.setSeconds(t)},this.setMilliseconds=function(t){n.setMilliseconds(t)}}var hs=jQuery.noConflict();!function(hs_cf7,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={calendar:Date,closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1},hs_cf7.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover(hs_cf7('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.bind("mouseout",function(t){var a=hs_cf7(t.target).closest(e);a.length&&a.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(a){var i=hs_cf7(a.target).closest(e);!hs_cf7.datepicker._isDisabledDatepicker(instActive.inline?t.parent()[0]:instActive.input[0])&&i.length&&(i.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),i.addClass("ui-state-hover"),i.hasClass("ui-datepicker-prev")&&i.addClass("ui-datepicker-prev-hover"),i.hasClass("ui-datepicker-next")&&i.addClass("ui-datepicker-next-hover"))})}function extendRemove(t,e){hs_cf7.extend(t,e);for(var a in e)(null==e[a]||e[a]==undefined)&&(t[a]=e[a]);return t}function isArray(t){return t&&(hs_cf7.browser.safari&&"object"==typeof t&&t.length||t.constructor&&t.constructor.toString().match(/\Array\(\)/))}hs_cf7.extend(hs_cf7.ui,{datepicker:{version:"1.8.14"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;hs_cf7.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return extendRemove(this._defaults,t||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline="div"==nodeName||"span"==nodeName;target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst(hs_cf7(target),inline),regional=hs_cf7.extend({},settings&&this.regional[settings.regional]||{});inst.settings=hs_cf7.extend(regional,settings||{},inlineSettings||{}),"input"==nodeName?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(t,e){var a=t[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\hs_cf71");return{id:a,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?bindHover(hs_cf7('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(t,e){var a=hs_cf7(t);e.append=hs_cf7([]),e.trigger=hs_cf7([]),a.hasClass(this.markerClassName)||(this._attachments(a,e),a.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(t,a,i){e.settings[a]=i}).bind("getData.datepicker",function(t,a){return this._get(e,a)}),this._autoSize(e),hs_cf7.data(t,PROP_NAME,e))},_attachments:function(t,e){var a=this._get(e,"appendText"),i=!1;e.append&&e.append.remove(),a&&(e.append=hs_cf7('<span class="'+this._appendClass+'">'+a+"</span>"),t[i?"before":"after"](e.append)),t.unbind("focus",this._showDatepicker),e.trigger&&e.trigger.remove();var s=this._get(e,"showOn");if(("focus"==s||"both"==s)&&t.focus(this._showDatepicker),"button"==s||"both"==s){var r=this._get(e,"buttonText"),n=this._get(e,"buttonImage");e.trigger=hs_cf7(this._get(e,"buttonImageOnly")?hs_cf7("<img/>").addClass(this._triggerClass).attr({src:n,alt:r,title:r}):hs_cf7('<button type="button"></button>').addClass(this._triggerClass).html(""==n?r:hs_cf7("<img/>").attr({src:n,alt:r,title:r}))),t[i?"before":"after"](e.trigger),e.trigger.click(function(){return hs_cf7.datepicker._datepickerShowing&&hs_cf7.datepicker._lastInput==t[0]?hs_cf7.datepicker._hideDatepicker():hs_cf7.datepicker._showDatepicker(t[0]),!1})}},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e=new Date(2009,11,20),a=this._get(t,"dateFormat");if(a.match(/[DM]/)){var i=function(t){for(var e=0,a=0,i=0;i<t.length;i++)t[i].length>e&&(e=t[i].length,a=i);return a};e.setMonth(i(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),e.setDate(i(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-e.getDay())}t.input.attr("size",this._formatDate(t,e).length)}},_inlineDatepicker:function(t,e){var a=hs_cf7(t);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(e.dpDiv).bind("setData.datepicker",function(t,a,i){e.settings[a]=i}).bind("getData.datepicker",function(t,a){return this._get(e,a)}),hs_cf7.data(t,PROP_NAME,e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.dpDiv.show())},_dialogDatepicker:function(t,e,a,i,s){var r=this._dialogInst;if(!r){this.uuid+=1;var n="dp"+this.uuid;this._dialogInput=hs_cf7('<input type="text" id="'+n+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'),this._dialogInput.keydown(this._doKeyDown),hs_cf7("body").append(this._dialogInput),r=this._dialogInst=this._newInst(this._dialogInput,!1),r.settings={},hs_cf7.data(this._dialogInput[0],PROP_NAME,r)}if(extendRemove(r.settings,i||{}),e=e&&e.constructor==Date?this._formatDate(r,e):e,this._dialogInput.val(e),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,!this._pos){var c=document.documentElement.clientWidth,o=document.documentElement.clientHeight,h=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[c/2-100+h,o/2-150+d]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),r.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),hs_cf7.blockUI&&hs_cf7.blockUI(this.dpDiv),hs_cf7.data(this._dialogInput[0],PROP_NAME,r),this},_destroyDatepicker:function(t){var e=hs_cf7(t),a=hs_cf7.data(t,PROP_NAME);if(e.hasClass(this.markerClassName)){var i=t.nodeName.toLowerCase();hs_cf7.removeData(t,PROP_NAME),"input"==i?(a.append.remove(),a.trigger.remove(),e.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"==i||"span"==i)&&e.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(t){var e=hs_cf7(t),a=hs_cf7.data(t,PROP_NAME);if(e.hasClass(this.markerClassName)){var i=t.nodeName.toLowerCase();if("input"==i)t.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if("div"==i||"span"==i){var s=e.children("."+this._inlineClass);s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=hs_cf7.map(this._disabledInputs,function(e){return e==t?null:e})}},_disableDatepicker:function(t){var e=hs_cf7(t),a=hs_cf7.data(t,PROP_NAME);if(e.hasClass(this.markerClassName)){var i=t.nodeName.toLowerCase();if("input"==i)t.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if("div"==i||"span"==i){var s=e.children("."+this._inlineClass);s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=hs_cf7.map(this._disabledInputs,function(e){return e==t?null:e}),this._disabledInputs[this._disabledInputs.length]=t}},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]==t)return!0;return!1},_getInst:function(t){try{return hs_cf7.data(t,PROP_NAME)}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,a){var i=this._getInst(t);if(2==arguments.length&&"string"==typeof e)return"defaults"==e?hs_cf7.extend({},hs_cf7.datepicker._defaults):i?"all"==e?hs_cf7.extend({},i.settings):this._get(i,e):null;var s=e||{};if("string"==typeof e&&(s={},s[e]=a),i){this._curInst==i&&this._hideDatepicker();var r=this._getDateDatepicker(t,!0),n=this._getMinMaxDate(i,"min"),c=this._getMinMaxDate(i,"max");extendRemove(i.settings,s),null!==n&&s.dateFormat!==undefined&&s.minDate===undefined&&(i.settings.minDate=this._formatDate(i,n)),null!==c&&s.dateFormat!==undefined&&s.maxDate===undefined&&(i.settings.maxDate=this._formatDate(i,c)),this._attachments(hs_cf7(t),i),this._autoSize(i),this._setDate(i,r),this._updateAlternate(i),this._updateDatepicker(i)}},_changeDatepicker:function(t,e,a){this._optionDatepicker(t,e,a)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var a=this._getInst(t);a&&(this._setDate(a,e),this._updateDatepicker(a),this._updateAlternate(a))},_getDateDatepicker:function(t,e){var a=this._getInst(t);return a&&!a.inline&&this._setDateFromField(a,e),a?this._getDate(a):null},_doKeyDown:function(t){var e=hs_cf7.datepicker._getInst(t.target),a=!0,i=e.dpDiv.is(".ui-datepicker-rtl");if(e._keyEvent=!0,hs_cf7.datepicker._datepickerShowing)switch(t.keyCode){case 9:hs_cf7.datepicker._hideDatepicker(),a=!1;break;case 13:var s=hs_cf7("td."+hs_cf7.datepicker._dayOverClass+":not(."+hs_cf7.datepicker._currentClass+")",e.dpDiv);return s[0]?hs_cf7.datepicker._selectDay(t.target,e.selectedMonth,e.selectedYear,s[0]):hs_cf7.datepicker._hideDatepicker(),!1;case 27:hs_cf7.datepicker._hideDatepicker();break;case 33:hs_cf7.datepicker._adjustDate(t.target,t.ctrlKey?-hs_cf7.datepicker._get(e,"stepBigMonths"):-hs_cf7.datepicker._get(e,"stepMonths"),"M");break;case 34:hs_cf7.datepicker._adjustDate(t.target,t.ctrlKey?+hs_cf7.datepicker._get(e,"stepBigMonths"):+hs_cf7.datepicker._get(e,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&hs_cf7.datepicker._clearDate(t.target),a=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&hs_cf7.datepicker._gotoToday(t.target),a=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&hs_cf7.datepicker._adjustDate(t.target,i?1:-1,"D"),a=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&hs_cf7.datepicker._adjustDate(t.target,t.ctrlKey?-hs_cf7.datepicker._get(e,"stepBigMonths"):-hs_cf7.datepicker._get(e,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&hs_cf7.datepicker._adjustDate(t.target,-7,"D"),a=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&hs_cf7.datepicker._adjustDate(t.target,i?-1:1,"D"),a=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&hs_cf7.datepicker._adjustDate(t.target,t.ctrlKey?+hs_cf7.datepicker._get(e,"stepBigMonths"):+hs_cf7.datepicker._get(e,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&hs_cf7.datepicker._adjustDate(t.target,7,"D"),a=t.ctrlKey||t.metaKey;break;default:a=!1}else 36==t.keyCode&&t.ctrlKey?hs_cf7.datepicker._showDatepicker(this):a=!1;a&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e=hs_cf7.datepicker._getInst(t.target);if(hs_cf7.datepicker._get(e,"constrainInput")){var a=hs_cf7.datepicker._possibleChars(hs_cf7.datepicker._get(e,"dateFormat")),i=String.fromCharCode(t.charCode==undefined?t.keyCode:t.charCode);return t.ctrlKey||t.metaKey||" ">i||!a||a.indexOf(i)>-1}},_doKeyUp:function(t){var e=hs_cf7.datepicker._getInst(t.target);if(e.input.val()!=e.lastVal)try{var a=hs_cf7.datepicker.parseDate(hs_cf7.datepicker._get(e,"dateFormat"),e.input?e.input.val():null,hs_cf7.datepicker._getFormatConfig(e));a&&(hs_cf7.datepicker._setDateFromField(e),hs_cf7.datepicker._updateAlternate(e),hs_cf7.datepicker._updateDatepicker(e))}catch(t){hs_cf7.datepicker.log(t)}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!=t.nodeName.toLowerCase()&&(t=hs_cf7("input",t.parentNode)[0]),!hs_cf7.datepicker._isDisabledDatepicker(t)&&hs_cf7.datepicker._lastInput!=t){var e=hs_cf7.datepicker._getInst(t);hs_cf7.datepicker._curInst&&hs_cf7.datepicker._curInst!=e&&(hs_cf7.datepicker._datepickerShowing&&hs_cf7.datepicker._triggerOnClose(hs_cf7.datepicker._curInst),hs_cf7.datepicker._curInst.dpDiv.stop(!0,!0));var a=hs_cf7.datepicker._get(e,"beforeShow");extendRemove(e.settings,a?a.apply(t,[t,e]):{}),e.lastVal=null,hs_cf7.datepicker._lastInput=t,hs_cf7.datepicker._setDateFromField(e),hs_cf7.datepicker._inDialog&&(t.value=""),hs_cf7.datepicker._pos||(hs_cf7.datepicker._pos=hs_cf7.datepicker._findPos(t),hs_cf7.datepicker._pos[1]+=t.offsetHeight);var i=!1;hs_cf7(t).parents().each(function(){return i|="fixed"==hs_cf7(this).css("position"),!i}),i&&hs_cf7.browser.opera&&(hs_cf7.datepicker._pos[0]-=document.documentElement.scrollLeft,hs_cf7.datepicker._pos[1]-=document.documentElement.scrollTop);var s={left:hs_cf7.datepicker._pos[0],top:hs_cf7.datepicker._pos[1]};if(hs_cf7.datepicker._pos=null,e.dpDiv.empty(),e.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),hs_cf7.datepicker._updateDatepicker(e),s=hs_cf7.datepicker._checkOffset(e,s,i),e.dpDiv.css({position:hs_cf7.datepicker._inDialog&&hs_cf7.blockUI?"static":i?"fixed":"absolute",display:"none",left:s.left+"px",top:s.top+"px"}),!e.inline){var r=hs_cf7.datepicker._get(e,"showAnim"),n=hs_cf7.datepicker._get(e,"duration"),c=function(){var t=e.dpDiv.find("iframe.ui-datepicker-cover");if(t.length){var a=hs_cf7.datepicker._getBorders(e.dpDiv);t.css({left:-a[0],top:-a[1],width:e.dpDiv.outerWidth(),height:e.dpDiv.outerHeight()})}};e.dpDiv.zIndex(hs_cf7(t).zIndex()+1),hs_cf7.datepicker._datepickerShowing=!0,hs_cf7.effects&&hs_cf7.effects[r]?e.dpDiv.show(r,hs_cf7.datepicker._get(e,"showOptions"),n,c):e.dpDiv[r||"show"](r?n:null,c),r&&n||c(),e.input.is(":visible")&&!e.input.is(":disabled")&&e.input.focus(),hs_cf7.datepicker._curInst=e}}},_updateDatepicker:function(t){var e=this;e.maxRows=4;var a=hs_cf7.datepicker._getBorders(t.dpDiv);instActive=t,t.dpDiv.empty().append(this._generateHTML(t));var i=t.dpDiv.find("iframe.ui-datepicker-cover");i.length&&i.css({left:-a[0],top:-a[1],width:t.dpDiv.outerWidth(),height:t.dpDiv.outerHeight()}),t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var s=this._getNumberOfMonths(t),r=s[1],n=17;if(t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),r>1&&t.dpDiv.addClass("ui-datepicker-multi-"+r).css("width",n*r+"em"),t.dpDiv[(1!=s[0]||1!=s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t==hs_cf7.datepicker._curInst&&hs_cf7.datepicker._datepickerShowing&&t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&t.input[0]!=document.activeElement&&t.input.focus(),t.yearshtml){var c=t.yearshtml;setTimeout(function(){c===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),c=t.yearshtml=null},0)}},_getBorders:function(t){var e=function(t){return{thin:1,medium:2,thick:3}[t]||t};return[parseFloat(e(t.css("border-left-width"))),parseFloat(e(t.css("border-top-width")))]},_checkOffset:function(t,e,a){var i=t.dpDiv.outerWidth(),s=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,n=t.input?t.input.outerHeight():0,c=document.documentElement.clientWidth+hs_cf7(document).scrollLeft(),o=document.documentElement.clientHeight+hs_cf7(document).scrollTop();return e.left-=this._get(t,"isRTL")?i-r:0,e.left-=a&&e.left==t.input.offset().left?hs_cf7(document).scrollLeft():0,e.top-=a&&e.top==t.input.offset().top+n?hs_cf7(document).scrollTop():0,e.left-=Math.min(e.left,e.left+i>c&&c>i?Math.abs(e.left+i-c):0),e.top-=Math.min(e.top,e.top+s>o&&o>s?Math.abs(s+n):0),e},_findPos:function(t){for(var e=this._getInst(t),a=this._get(e,"isRTL");t&&("hidden"==t.type||1!=t.nodeType||hs_cf7.expr.filters.hidden(t));)t=t[a?"previousSibling":"nextSibling"];var i=hs_cf7(t).offset();return[i.left,i.top]},_triggerOnClose:function(t){var e=this._get(t,"onClose");e&&e.apply(t.input?t.input[0]:null,[t.input?t.input.val():"",t])},_hideDatepicker:function(t){var e=this._curInst;if(e&&(!t||e==hs_cf7.data(t,PROP_NAME))&&this._datepickerShowing){var a=this._get(e,"showAnim"),i=this._get(e,"duration"),s=function(){hs_cf7.datepicker._tidyDialog(e),this._curInst=null};hs_cf7.effects&&hs_cf7.effects[a]?e.dpDiv.hide(a,hs_cf7.datepicker._get(e,"showOptions"),i,s):e.dpDiv["slideDown"==a?"slideUp":"fadeIn"==a?"fadeOut":"hide"](a?i:null,s),a||s(),hs_cf7.datepicker._triggerOnClose(e),this._datepickerShowing=!1,this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),hs_cf7.blockUI&&(hs_cf7.unblockUI(),hs_cf7("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(hs_cf7.datepicker._curInst){var e=hs_cf7(t.target);e[0].id==hs_cf7.datepicker._mainDivId||0!=e.parents("#"+hs_cf7.datepicker._mainDivId).length||e.hasClass(hs_cf7.datepicker.markerClassName)||e.hasClass(hs_cf7.datepicker._triggerClass)||!hs_cf7.datepicker._datepickerShowing||hs_cf7.datepicker._inDialog&&hs_cf7.blockUI||hs_cf7.datepicker._hideDatepicker()}},_adjustDate:function(t,e,a){var i=hs_cf7(t),s=this._getInst(i[0]);this._isDisabledDatepicker(i[0])||(this._adjustInstDate(s,e+("M"==a?this._get(s,"showCurrentAtPos"):0),a),this._updateDatepicker(s))},_gotoToday:function(t){var e=hs_cf7(t),a=this._getInst(e[0]);if(this._get(a,"gotoCurrent")&&a.currentDay)a.selectedDay=a.currentDay,a.drawMonth=a.selectedMonth=a.currentMonth,a.drawYear=a.selectedYear=a.currentYear;else{var i=new this.CDate;a.selectedDay=i.getDate(),a.drawMonth=a.selectedMonth=i.getMonth(),a.drawYear=a.selectedYear=i.getFullYear()}this._notifyChange(a),this._adjustDate(e)},_selectMonthYear:function(t,e,a){var i=hs_cf7(t),s=this._getInst(i[0]);s._selectingMonthYear=!1,s["selected"+("M"==a?"Month":"Year")]=s["draw"+("M"==a?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),this._notifyChange(s),this._adjustDate(i)},_clickMonthYear:function(t){var e=hs_cf7(t),a=this._getInst(e[0]);a.input&&a._selectingMonthYear&&setTimeout(function(){a.input.focus()},0),a._selectingMonthYear=!a._selectingMonthYear},_selectDay:function(t,e,a,i){var s=hs_cf7(t);if(!hs_cf7(i).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(s[0])){var r=this._getInst(s[0]);r.selectedDay=r.currentDay=hs_cf7("a",i).html(),r.selectedMonth=r.currentMonth=e,r.selectedYear=r.currentYear=a,this._selectDate(t,this._formatDate(r,r.currentDay,r.currentMonth,r.currentYear))}},_clearDate:function(t){{var e=hs_cf7(t);this._getInst(e[0])}this._selectDate(e,"")},_selectDate:function(t,e){var a=hs_cf7(t),i=this._getInst(a[0]);e=null!=e?e:this._formatDate(i),i.input&&i.input.val(e),this._updateAlternate(i);var s=this._get(i,"onSelect");s?s.apply(i.input?i.input[0]:null,[e,i]):i.input&&i.input.trigger("change"),i.inline?this._updateDatepicker(i):(this._hideDatepicker(),this._lastInput=i.input[0],"object"!=typeof i.input[0]&&i.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var e=this._get(t,"altField");if(e){var a=this._get(t,"altFormat")||this._get(t,"dateFormat"),i=this._getDate(t),s=this.formatDate(a,i,this._getFormatConfig(t));hs_cf7(e).each(function(){hs_cf7(this).val(s)})}},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e=new Date(t.getTime());e.setDate(e.getDate()+4-(e.getDay()||7));var a=e.getTime();return e.setMonth(0),e.setDate(1),Math.floor(Math.round((a-e)/864e5)/7)+1},parseDate:function(t,e,a){if(null==t||null==e)throw"Invalid arguments";if(e="object"==typeof e?e.toString():e+"",""==e)return null;var i=(a?a.shortYearCutoff:null)||this._defaults.shortYearCutoff;i="string"!=typeof i?i:(new this.CDate).getFullYear()%100+parseInt(i,10);for(var s=(a?a.dayNamesShort:null)||this._defaults.dayNamesShort,r=(a?a.dayNames:null)||this._defaults.dayNames,n=(a?a.monthNamesShort:null)||this._defaults.monthNamesShort,c=(a?a.monthNames:null)||this._defaults.monthNames,o=-1,h=-1,d=-1,u=-1,l=!1,_=function(e){var a=D+1<t.length&&t.charAt(D+1)==e;return a&&D++,a},f=function(t){var a=_(t),i="@"==t?14:"!"==t?20:"y"==t&&a?4:"o"==t?3:2,s=new RegExp("^\\d{1,"+i+"}"),r=e.substring(m).match(s);if(!r)throw"Missing number at position "+m;return m+=r[0].length,parseInt(r[0],10)},p=function(t,a,i){var s=hs_cf7.map(_(t)?i:a,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)}),r=-1;if(hs_cf7.each(s,function(t,a){var i=a[1];return e.substr(m,i.length).toLowerCase()==i.toLowerCase()?(r=a[0],m+=i.length,!1):void 0}),-1!=r)return r+1;throw"Unknown name at position "+m},g=function(){if(e.charAt(m)!=t.charAt(D))throw"Unexpected literal at position "+m;m++},m=0,D=0;D<t.length;D++)if(l)"'"!=t.charAt(D)||_("'")?g():l=!1;else switch(t.charAt(D)){case"d":d=f("d");break;case"D":p("D",s,r);break;case"o":u=f("o");break;case"m":h=f("m");break;case"M":h=p("M",n,c);break;case"y":o=f("y");break;case"@":var k=new this.CDate(f("@"));o=k.getFullYear(),h=k.getMonth()+1,d=k.getDate();break;case"!":var k=new Date((f("!")-this._ticksTo1970)/1e4);o=k.getFullYear(),h=k.getMonth()+1,d=k.getDate();break;case"'":_("'")?g():l=!0;break;default:g()}if(m<e.length)throw"Extra/unparsed characters found in date: "+e.substring(m);if(-1==o?o=(new this.CDate).getFullYear():100>o&&(o+=(new this.CDate).getFullYear()-(new this.CDate).getFullYear()%100+(i>=o?0:-100)),u>-1)for(h=1,d=u;;){var v=this._getDaysInMonth(o,h-1);if(v>=d)break;h++,d-=v}var k=this._daylightSavingAdjust(new this.CDate(o,h-1,d));if(k.getFullYear()!=o||k.getMonth()+1!=h||k.getDate()!=d)throw"Invalid date";return k},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,a){if(!e)return"";var i=(a?a.dayNamesShort:null)||this._defaults.dayNamesShort,s=(a?a.dayNames:null)||this._defaults.dayNames,r=(a?a.monthNamesShort:null)||this._defaults.monthNamesShort,n=(a?a.monthNames:null)||this._defaults.monthNames,c=function(e){var a=l+1<t.length&&t.charAt(l+1)==e;return a&&l++,a},o=function(t,e,a){var i=""+e;if(c(t))for(;i.length<a;)i="0"+i;return i},h=function(t,e,a,i){return c(t)?i[e]:a[e]},d="",u=!1;if(e)for(var l=0;l<t.length;l++)if(u)"'"!=t.charAt(l)||c("'")?d+=t.charAt(l):u=!1;else switch(t.charAt(l)){case"d":d+=o("d",e.getDate(),2);break;case"D":d+=h("D",e.getDay(),i,s);break;case"o":d+=o("o",Math.round((new this.CDate(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new this.CDate(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=o("m",e.getMonth()+1,2);break;case"M":d+=h("M",e.getMonth(),r,n);break;case"y":d+=c("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":d+=e.getTime();break;case"!":d+=1e4*e.getTime()+this._ticksTo1970;break;case"'":c("'")?d+="'":u=!0;break;default:d+=t.charAt(l)}return d},_possibleChars:function(t){for(var e="",a=!1,i=function(e){var a=s+1<t.length&&t.charAt(s+1)==e;return a&&s++,a},s=0;s<t.length;s++)if(a)"'"!=t.charAt(s)||i("'")?e+=t.charAt(s):a=!1;else switch(t.charAt(s)){case"d":case"m":case"y":case"@":e+="0123456789";break;case"D":case"M":return null;case"'":i("'")?e+="'":a=!0;break;default:e+=t.charAt(s)}return e},_get:function(t,e){return t.settings[e]!==undefined?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!=t.lastVal){var a,i,s=this._get(t,"dateFormat"),r=t.lastVal=t.input?t.input.val():null;a=i=this._getDefaultDate(t);var n=this._getFormatConfig(t);try{a=this.parseDate(s,r,n)||i}catch(c){this.log(c),r=e?"":r}t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),t.currentDay=r?a.getDate():0,t.currentMonth=r?a.getMonth():0,t.currentYear=r?a.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this.CDate=this._get(t,"calendar"),this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new this.CDate))},_determineDate:function(t,e,a){var i=this.CDate,s=function(t){var e=new i;return e.setDate(e.getDate()+t),e},r=function(e){try{return hs_cf7.datepicker.parseDate(hs_cf7.datepicker._get(t,"dateFormat"),e,hs_cf7.datepicker._getFormatConfig(t))}catch(a){}for(var s=(e.toLowerCase().match(/^c/)?hs_cf7.datepicker._getDate(t):null)||new i,r=s.getFullYear(),n=s.getMonth(),c=s.getDate(),o=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,h=o.exec(e);h;){switch(h[2]||"d"){case"d":case"D":c+=parseInt(h[1],10);break;case"w":case"W":c+=7*parseInt(h[1],10);break;case"m":case"M":n+=parseInt(h[1],10),c=Math.min(c,hs_cf7.datepicker._getDaysInMonth(r,n));break;case"y":case"Y":r+=parseInt(h[1],10),c=Math.min(c,hs_cf7.datepicker._getDaysInMonth(r,n))}h=o.exec(e)}return new i(r,n,c)},n=null==e||""===e?a:"string"==typeof e?r(e):"number"==typeof e?isNaN(e)?a:s(e):new i(e.getTime());return n=n&&"Invalid Date"==n.toString()?a:n,n&&(n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0)),this._daylightSavingAdjust(n)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,a){var i=!e,s=t.selectedMonth,r=t.selectedYear;this.CDate=this._get(t,"calendar");
|
2 |
+
var n=this._restrictMinMax(t,this._determineDate(t,e,new this.CDate));t.selectedDay=t.currentDay=n.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=n.getMonth(),t.drawYear=t.selectedYear=t.currentYear=n.getFullYear(),s==t.selectedMonth&&r==t.selectedYear||a||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(i?"":this._formatDate(t))},_getDate:function(t){this.CDate=this._get(t,"calendar");var e=!t.currentYear||t.input&&""==t.input.val()?null:this._daylightSavingAdjust(new this.CDate(t.currentYear,t.currentMonth,t.currentDay));return e},_generateHTML:function(t){var e=new this.CDate;e=this._daylightSavingAdjust(new this.CDate(e.getFullYear(),e.getMonth(),e.getDate()));var a=this._get(t,"isRTL"),i=this._get(t,"showButtonPanel"),s=this._get(t,"hideIfNoPrevNext"),r=this._get(t,"navigationAsDateFormat"),n=this._getNumberOfMonths(t),c=this._get(t,"showCurrentAtPos"),o=this._get(t,"stepMonths"),h=1!=n[0]||1!=n[1],d=this._daylightSavingAdjust(t.currentDay?new this.CDate(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),u=this._getMinMaxDate(t,"min"),l=this._getMinMaxDate(t,"max"),_=t.drawMonth-c,f=t.drawYear;if(0>_&&(_+=12,f--),l){var p=this._daylightSavingAdjust(new this.CDate(l.getFullYear(),l.getMonth()-n[0]*n[1]+1,l.getDate()));for(p=u&&this._compareDate(p,"<",u)?u:p;this._daylightSavingAdjust(new this.CDate(f,_,1))>p;)_--,0>_&&(_=11,f--)}t.drawMonth=_,t.drawYear=f;var g=this._get(t,"prevText");g=r?this.formatDate(g,this._daylightSavingAdjust(new this.CDate(f,_-o,1)),this._getFormatConfig(t)):g;var m=this._canAdjustMonth(t,-1,f,_)?'<a style="direction:ltr" class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+t.id+"', -"+o+", 'M');\" title=\""+g+'"><span class="ui-icon ui-icon-circle-triangle-'+(a?"e":"w")+'">'+g+"</span></a>":s?"":'<a style="direction:ltr" class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+g+'"><span class="ui-icon ui-icon-circle-triangle-'+(a?"e":"w")+'">'+g+"</span></a>",D=this._get(t,"nextText");D=r?this.formatDate(D,this._daylightSavingAdjust(new this.CDate(f,_+o,1)),this._getFormatConfig(t)):D;var k=this._canAdjustMonth(t,1,f,_)?'<a style="direction:ltr" class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+t.id+"', +"+o+", 'M');\" title=\""+D+'"><span class="ui-icon ui-icon-circle-triangle-'+(a?"w":"e")+'">'+D+"</span></a>":s?"":'<a style="direction:ltr" class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+D+'"><span class="ui-icon ui-icon-circle-triangle-'+(a?"w":"e")+'">'+D+"</span></a>",v=this._get(t,"currentText"),y=this._get(t,"gotoCurrent")&&t.currentDay?d:e;v=r?this.formatDate(v,y,this._getFormatConfig(t)):v;var M=t.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(t,"closeText")+"</button>",w=i?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(a?M:"")+(this._isInRange(t,y)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+t.id+"');\">"+v+"</button>":"")+(a?"":M)+"</div>":"",b=parseInt(this._get(t,"firstDay"),10);b=isNaN(b)?0:b;for(var C=this._get(t,"showWeek"),I=this._get(t,"dayNames"),N=(this._get(t,"dayNamesShort"),this._get(t,"dayNamesMin")),x=this._get(t,"monthNames"),S=this._get(t,"monthNamesShort"),Y=this._get(t,"beforeShowDay"),T=this._get(t,"showOtherMonths"),A=this._get(t,"selectOtherMonths"),j=(this._get(t,"calculateWeek")||this.iso8601Week,this._getDefaultDate(t)),F="",O=0;O<n[0];O++){var P="";this.maxRows=4;for(var R=0;R<n[1];R++){var H=this._daylightSavingAdjust(new this.CDate(f,_,t.selectedDay)),E=" ui-corner-all",K="";if(h){if(K+='<div class="ui-datepicker-group',n[1]>1)switch(R){case 0:K+=" ui-datepicker-group-first",E=" ui-corner-"+(a?"right":"left");break;case n[1]-1:K+=" ui-datepicker-group-last",E=" ui-corner-"+(a?"left":"right");break;default:K+=" ui-datepicker-group-middle",E=""}K+='">'}K+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+E+'">'+(/all|left/.test(E)&&0==O?a?k:m:"")+(/all|right/.test(E)&&0==O?a?m:k:"")+this._generateMonthYearHeader(t,_,f,u,l,O>0||R>0,x,S)+'</div><table class="ui-datepicker-calendar"><thead><tr>';for(var L=C?'<th class="ui-datepicker-week-col">'+this._get(t,"weekHeader")+"</th>":"",W=0;7>W;W++){var G=(W+b)%7;L+="<th"+((W+b+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+I[G]+'">'+N[G]+"</span></th>"}K+=L+"</tr></thead><tbody>";var Q=this._getDaysInMonth(f,_);f==t.selectedYear&&_==t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,Q));var z=(this._getFirstDayOfMonth(f,_)-b+7)%7,U=Math.ceil((z+Q)/7),B=h&&this.maxRows>U?this.maxRows:U;this.maxRows=B;for(var J=this._daylightSavingAdjust(new this.CDate(f,_,1-z)),V=0;B>V;V++){K+="<tr>";for(var Z=C?'<td class="ui-datepicker-week-col">'+this._get(t,"calculateWeek")(J)+"</td>":"",W=0;7>W;W++){var X=Y?Y.apply(t.input?t.input[0]:null,[J]):[!0,""],q=J.getMonth()!=_,$=q&&!A||!X[0]||u&&this._compareDate(J,"<",u)||l&&this._compareDate(J,">",l);Z+='<td class="'+((W+b+6)%7>=5?" ui-datepicker-week-end":"")+(q?" ui-datepicker-other-month":"")+(J.getTime()==H.getTime()&&_==t.selectedMonth&&t._keyEvent||j.getTime()==J.getTime()&&j.getTime()==H.getTime()?" "+this._dayOverClass:"")+($?" "+this._unselectableClass+" ui-state-disabled":"")+(q&&!T?"":" "+X[1]+(J.getTime()==d.getTime()?" "+this._currentClass:"")+(J.getTime()==e.getTime()?" ui-datepicker-today":""))+'"'+(q&&!T||!X[2]?"":' title="'+X[2]+'"')+($?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+t.id+"',"+J.getMonth()+","+J.getFullYear()+', this);return false;"')+">"+(q&&!T?" ":$?'<span class="ui-state-default">'+J.getDate()+"</span>":'<a class="ui-state-default'+(J.getTime()==e.getTime()?" ui-state-highlight":"")+(J.getTime()==d.getTime()?" ui-state-active":"")+(q?" ui-priority-secondary":"")+'" href="#">'+J.getDate()+"</a>")+"</td>",J.setDate(J.getDate()+1),J=this._daylightSavingAdjust(J)}K+=Z+"</tr>"}_++,_>11&&(_=0,f++),K+="</tbody></table>"+(h?"</div>"+(n[0]>0&&R==n[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),P+=K}F+=P}return F+=w+(hs_cf7.browser.msie&&parseInt(hs_cf7.browser.version,10)<7&&!t.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),t._keyEvent=!1,F},_generateMonthYearHeader:function(t,e,a,i,s,r,n,c){var o=this._get(t,"changeMonth"),h=this._get(t,"changeYear"),d=this._get(t,"showMonthAfterYear"),u='<div class="ui-datepicker-title">',l="";if(r||!o)l+='<span class="ui-datepicker-month">'+n[e]+"</span>";else{var _=i&&i.getFullYear()==a,f=s&&s.getFullYear()==a;l+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+t.id+"', this, 'M');\" onclick=\"DP_jQuery_"+dpuuid+".datepicker._clickMonthYear('#"+t.id+"');\">";for(var p=0;12>p;p++)(!_||p>=i.getMonth())&&(!f||p<=s.getMonth())&&(l+='<option value="'+p+'"'+(p==e?' selected="selected"':"")+">"+c[p]+"</option>");l+="</select>"}if(d||(u+=l+(!r&&o&&h?"":" ")),!t.yearshtml)if(t.yearshtml="",r||!h)u+='<span class="ui-datepicker-year">'+a+"</span>";else{var g=this._get(t,"yearRange").split(":"),m=(new this.CDate).getFullYear(),D=function(t){var e=t.match(/c[+-].*/)?a+parseInt(t.substring(1),10):t.match(/[+-].*/)?m+parseInt(t,10):parseInt(t,10);return isNaN(e)?m:e},k=D(g[0]),v=Math.max(k,D(g[1]||""));for(k=i?Math.max(k,i.getFullYear()):k,v=s?Math.min(v,s.getFullYear()):v,t.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+t.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+dpuuid+".datepicker._clickMonthYear('#"+t.id+"');\">";v>=k;k++)t.yearshtml+='<option value="'+k+'"'+(k==a?' selected="selected"':"")+">"+k+"</option>";t.yearshtml+="</select>",u+=t.yearshtml,t.yearshtml=null}return u+=this._get(t,"yearSuffix"),d&&(u+=(!r&&o&&h?"":" ")+l),u+="</div>"},_adjustInstDate:function(t,e,a){var i=t.drawYear+("Y"==a?e:0),s=t.drawMonth+("M"==a?e:0),r=Math.min(t.selectedDay,this._getDaysInMonth(i,s))+("D"==a?e:0),n=this._restrictMinMax(t,this._daylightSavingAdjust(new this.CDate(i,s,r)));t.selectedDay=n.getDate(),t.drawMonth=t.selectedMonth=n.getMonth(),t.drawYear=t.selectedYear=n.getFullYear(),("M"==a||"Y"==a)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var a=this._getMinMaxDate(t,"min"),i=this._getMinMaxDate(t,"max"),s=a&&this._compareDate(e,"<",a)?a:e;return s=i&&this._compareDate(s,">",i)?i:s},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new this.CDate(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new this.CDate(t,e,1).getDay()},_canAdjustMonth:function(t,e,a,i){var s=this._getNumberOfMonths(t),r=this._daylightSavingAdjust(new this.CDate(a,i+(0>e?e:s[0]*s[1]),1));return 0>e&&r.setDate(this._getDaysInMonth(r.getFullYear(),r.getMonth())),this._isInRange(t,r)},_isInRange:function(t,e){var a=this._getMinMaxDate(t,"min"),i=this._getMinMaxDate(t,"max");return(!a||e.getTime()>=a.getTime())&&(!i||e.getTime()<=i.getTime())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return this.CDate=this._get(t,"calendar"),e="string"!=typeof e?e:(new this.CDate).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,a,i){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var s=e?"object"==typeof e?e:this._daylightSavingAdjust(new this.CDate(i,a,e)):this._daylightSavingAdjust(new this.CDate(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),s,this._getFormatConfig(t))},_compareDate:function(t,e,a){return t&&a?(t.getGregorianDate&&(t=t.getGregorianDate()),a.getGregorianDate&&(a=a.getGregorianDate()),"<"==e?a>t:t>a):null}}),hs_cf7.fn.datepicker=function(t){if(!this.length)return this;hs_cf7.datepicker.initialized||(hs_cf7(document).mousedown(hs_cf7.datepicker._checkExternalClick).find("body").append(hs_cf7.datepicker.dpDiv),hs_cf7.datepicker.initialized=!0);var e=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!=t&&"getDate"!=t&&"widget"!=t?"option"==t&&2==arguments.length&&"string"==typeof arguments[1]?hs_cf7.datepicker["_"+t+"Datepicker"].apply(hs_cf7.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?hs_cf7.datepicker["_"+t+"Datepicker"].apply(hs_cf7.datepicker,[this].concat(e)):hs_cf7.datepicker._attachDatepicker(this,t)}):hs_cf7.datepicker["_"+t+"Datepicker"].apply(hs_cf7.datepicker,[this[0]].concat(e))},hs_cf7.datepicker=new Datepicker,hs_cf7.datepicker.initialized=!1,hs_cf7.datepicker.uuid=(new Date).getTime(),hs_cf7.datepicker.version="1.8.14",window["DP_jQuery_"+dpuuid]=hs_cf7}(jQuery);var GREGORIAN_EPOCH=1721425.5,ISLAMIC_EPOCH=1948439.5,PERSIAN_EPOCH=1948320.5;jQuery(function(t){t.datepicker.regional.ar={calendar:HijriDate,closeText:"إغلاق",prevText:"السابق",nextText:"التالي",currentText:"اليوم",monthNames:["محرّم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الآخرة","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة"],monthNamesShort:["محرّم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الآخرة","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة"],dayNames:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],dayNamesShort:["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],dayNamesMin:["أ","ا","ث","أ","خ","ج","س"],weekHeader:"س",dateFormat:"dd/mm/yy",firstDay:6,isRTL:!0,showMonthAfterYear:!1,yearSuffix:"",calculateWeek:function(t){var e=new HijriDate(t.getFullYear(),t.getMonth(),t.getDate()+(t.getDay()||7)-3);return Math.floor(Math.round((e.getTime()-new HijriDate(e.getFullYear(),0,1).getTime())/864e5)/7)+1}},t.datepicker.setDefaults(t.datepicker.regional.ar)}),jQuery(function(t){t.datepicker.regional.fa={calendar:JalaliDate,closeText:"بستن",prevText:"قبل",nextText:"بعد",currentText:"امروز",monthNames:["فروردين","ارديبهشت","خرداد","تير","مرداد","شهريور","مهر","آبان","آذر","دي","بهمن","اسفند"],monthNamesShort:["فروردين","ارديبهشت","خرداد","تير","مرداد","شهريور","مهر","آبان","آذر","دي","بهمن","اسفند"],dayNames:["يکشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],dayNamesShort:["يک","دو","سه","چهار","پنج","جمعه","شنبه"],dayNamesMin:["ي","د","س","چ","پ","ج","ش"],weekHeader:"ه",dateFormat:"dd/mm/yy",firstDay:6,isRTL:!0,showMonthAfterYear:!1,yearSuffix:"",calculateWeek:function(t){var e=new JalaliDate(t.getFullYear(),t.getMonth(),t.getDate()+(t.getDay()||7)-3);return Math.floor(Math.round((e.getTime()-new JalaliDate(e.getFullYear(),0,1).getTime())/864e5)/7)+1}},t.datepicker.setDefaults(t.datepicker.regional.fa)});
|
assets/js/keyboard.js
DELETED
@@ -1,823 +0,0 @@
|
|
1 |
-
jQuery(document).ready(function(){
|
2 |
-
jQuery( document ).ready(function(){
|
3 |
-
jQuery(".keyb textarea").addClass("keyb");
|
4 |
-
jQuery(".keyb input").addClass("keyb");
|
5 |
-
});
|
6 |
-
});
|
7 |
-
var VKI_attach, VKI_close;
|
8 |
-
(function() {
|
9 |
-
var self = this;
|
10 |
-
this.VKI_version = "";
|
11 |
-
this.VKI_showVersion = false;
|
12 |
-
this.VKI_target = false;
|
13 |
-
this.VKI_shift = this.VKI_shiftlock = false;
|
14 |
-
this.VKI_altgr = this.VKI_altgrlock = false;
|
15 |
-
this.VKI_dead = false;
|
16 |
-
this.VKI_deadBox = false; // Show the dead keys checkbox
|
17 |
-
this.VKI_deadkeysOn = false; // Turn dead keys on by default
|
18 |
-
this.VKI_numberPad = true; // Allow user to open and close the number pad
|
19 |
-
this.VKI_numberPadOn = false; // Show number pad by default
|
20 |
-
this.VKI_kts = this.VKI_kt = "فارسی"; // Default keyboard layout
|
21 |
-
this.VKI_langAdapt = true; // Use lang attribute of input to select keyboard
|
22 |
-
this.VKI_size = 2; // Default keyboard size (1-5)
|
23 |
-
this.VKI_sizeAdj = false; // Allow user to adjust keyboard size
|
24 |
-
this.VKI_clearPasswords = false; // Clear password fields on focus
|
25 |
-
this.VKI_imageURI = ""; // If empty string, use imageless mode
|
26 |
-
this.VKI_clickless = 0; // 0 = disabled, > 0 = delay in ms
|
27 |
-
this.VKI_activeTab = 0; // Tab moves to next: 1 = element, 2 = keyboard enabled element
|
28 |
-
this.VKI_enterSubmit = true; // Submit forms when Enter is pressed
|
29 |
-
this.VKI_keyCenter = 3;
|
30 |
-
|
31 |
-
this.VKI_isIE = /*@cc_on!@*/false;
|
32 |
-
this.VKI_isIE6 = /*@if(@_jscript_version == 5.6)!@end@*/false;
|
33 |
-
this.VKI_isIElt8 = /*@if(@_jscript_version < 5.8)!@end@*/false;
|
34 |
-
this.VKI_isWebKit = RegExp("KHTML").test(navigator.userAgent);
|
35 |
-
this.VKI_isOpera = RegExp("Opera").test(navigator.userAgent);
|
36 |
-
this.VKI_isMoz = (!this.VKI_isWebKit && navigator.product == "Gecko");
|
37 |
-
|
38 |
-
/* ***** i18n text strings ************************************* */
|
39 |
-
this.VKI_i18n = {
|
40 |
-
'00': "نمایش صفحه کلید اعداد",
|
41 |
-
'01': "نمایش صفحه کلید مجازی",
|
42 |
-
'02': "انتخاب زبان صفحه کلید",
|
43 |
-
'03': "Dead keys",
|
44 |
-
'04': "روشن",
|
45 |
-
'05': "خاموش",
|
46 |
-
'06': "بستن صفحه کلید",
|
47 |
-
'07': "پاکسازی",
|
48 |
-
'08': "پاکسازی ورودی",
|
49 |
-
'09': "ورژن",
|
50 |
-
'10': "کاهش سایز صفحه کلید",
|
51 |
-
'11': "افزایش سایز صفحه کلید"
|
52 |
-
};
|
53 |
-
|
54 |
-
|
55 |
-
/* ***** Create keyboards ************************************** */
|
56 |
-
this.VKI_layout = {};
|
57 |
-
|
58 |
-
this.VKI_layout['فارسی'] = {
|
59 |
-
'name': "فارسی", 'keys': [
|
60 |
-
[["\u067e", "\u0651 "], ["1", "!", "\u00a1", "\u00b9"], ["2", "@", "\u00b2"], ["3", "#", "\u00b3"], ["4", "$", "\u00a4", "\u00a3"], ["5", "%", "\u20ac"], ["6", "^", "\u00bc"], ["7", "&", "\u00bd"], ["8", "*", "\u00be"], ["9", "(", "\u2018"], ["0", ")", "\u2019"], ["-", "_", "\u00a5"], ["=", "+", "\u00d7", "\u00f7"], ["Bksp", "Bksp"]],
|
61 |
-
[["Tab", "Tab"], ["\u0636", "\u064e"], ["\u0635", "\u064b"], ["\u062b", "\u064f"], ["\u0642", "\u064c"], ["\u0641", "\u0644"], ["\u063a", "\u0625"], ["\u0639", "\u2018"], ["\u0647", "\u00f7"], ["\u062e", "\u00d7"], ["\u062d", "\u061b"], ["\u062c", "<"], ["\u0686", ">"], ["\u0698", "|"]],
|
62 |
-
[["Caps", "Caps"], ["\u0634", "\u0650"], ["\u0633", "\u064d"], ["\u064a", "]"], ["\u0628", "["], ["\u0644", "\u0644"], ["\u0627", "\u0623"], ["\u062a", "\u0640"], ["\u0646", "\u060c"], ["\u0645", "\\"], ["\u06af", ":"], ["\u0643", '"'], ["Enter", "Enter"]],
|
63 |
-
[["Shift", "Shift"], ["\u0638", "~"], ["\u0637", "\u0652"], ["\u0632", "}"], ["\u0631", "{"], ["\u0630", "\u0644"], ["\u062f", "\u0622"], ["\u0626", "\u0621"], ["\u0648", ","], [".", "."], ["/", "\u061f"], ["Shift", "Shift"]],
|
64 |
-
[[" ", " ", " ", " "], ["Alt", "Alt"]]
|
65 |
-
], 'lang': ["fa"] };
|
66 |
-
|
67 |
-
|
68 |
-
this.VKI_layout['انگلیسی'] = {
|
69 |
-
'name': "انگلیسی", 'keys': [
|
70 |
-
[["`", "~"], ["1", "!", "\u00a1", "\u00b9"], ["2", "@", "\u00b2"], ["3", "#", "\u00b3"], ["4", "$", "\u00a4", "\u00a3"], ["5", "%", "\u20ac"], ["6", "^", "\u00bc"], ["7", "&", "\u00bd"], ["8", "*", "\u00be"], ["9", "(", "\u2018"], ["0", ")", "\u2019"], ["-", "_", "\u00a5"], ["=", "+", "\u00d7", "\u00f7"], ["Bksp", "Bksp"]],
|
71 |
-
[["Tab", "Tab"], ["q", "Q", "\u00e4", "\u00c4"], ["w", "W", "\u00e5", "\u00c5"], ["e", "E", "\u00e9", "\u00c9"], ["r", "R", "\u00ae"], ["t", "T", "\u00fe", "\u00de"], ["y", "Y", "\u00fc", "\u00dc"], ["u", "U", "\u00fa", "\u00da"], ["i", "I", "\u00ed", "\u00cd"], ["o", "O", "\u00f3", "\u00d3"], ["p", "P", "\u00f6", "\u00d6"], ["[", "{", "\u00ab"], ["]", "}", "\u00bb"], ["\\", "|", "\u00ac", "\u00a6"]],
|
72 |
-
[["Caps", "Caps"], ["a", "A", "\u00e1", "\u00c1"], ["s", "S", "\u00df", "\u00a7"], ["d", "D", "\u00f0", "\u00d0"], ["f", "F"], ["g", "G"], ["h", "H"], ["j", "J"], ["k", "K"], ["l", "L", "\u00f8", "\u00d8"], [";", ":", "\u00b6", "\u00b0"], ["'", '"', "\u00b4", "\u00a8"], ["Enter", "Enter"]],
|
73 |
-
[["Shift", "Shift"], ["z", "Z", "\u00e6", "\u00c6"], ["x", "X"], ["c", "C", "\u00a9", "\u00a2"], ["v", "V"], ["b", "B"], ["n", "N", "\u00f1", "\u00d1"], ["m", "M", "\u00b5"], [",", "<", "\u00e7", "\u00c7"], [".", ">"], ["/", "?", "\u00bf"], ["Shift", "Shift"]],
|
74 |
-
[[" ", " ", " ", " "], ["Alt", "Alt"]]
|
75 |
-
], 'lang': ["en"] };
|
76 |
-
|
77 |
-
/* ***** Define Dead Keys ************************************** */
|
78 |
-
this.VKI_deadkey = {};
|
79 |
-
|
80 |
-
this.VKI_deadkey['\u0385'] = { // Greek Dialytika + Tonos
|
81 |
-
'\u03b9': "\u0390", '\u03c5': "\u03b0"
|
82 |
-
};
|
83 |
-
|
84 |
-
/* ***** Define Symbols **************************************** */
|
85 |
-
this.VKI_symbol = {
|
86 |
-
'\u00a0': "NB\nSP", '\u200b': "ZW\nSP", '\u200c': "ZW\nNJ", '\u200d': "ZW\nJ"
|
87 |
-
};
|
88 |
-
|
89 |
-
|
90 |
-
/* ***** Layout Number Pad ************************************* */
|
91 |
-
this.VKI_numpad = [
|
92 |
-
[["$"], ["\u00a3"], ["\u20ac"], ["\u00a5"]],
|
93 |
-
[["7"], ["8"], ["9"], ["/"]],
|
94 |
-
[["4"], ["5"], ["6"], ["*"]],
|
95 |
-
[["1"], ["2"], ["3"], ["-"]],
|
96 |
-
[["0"], ["."], ["="], ["+"]]
|
97 |
-
];
|
98 |
-
|
99 |
-
|
100 |
-
/* ****************************************************************
|
101 |
-
* Attach the keyboard to an element
|
102 |
-
*
|
103 |
-
*/
|
104 |
-
VKI_attach = function(elem) {
|
105 |
-
if (elem.getAttribute("VKI_attached")) return false;
|
106 |
-
if (self.VKI_imageURI) {
|
107 |
-
var keybut = document.createElement('img');
|
108 |
-
keybut.src = self.VKI_imageURI;
|
109 |
-
keybut.alt = self.VKI_i18n['01'];
|
110 |
-
keybut.className = "keybInitiator";
|
111 |
-
keybut.title = self.VKI_i18n['01'];
|
112 |
-
keybut.elem = elem;
|
113 |
-
keybut.onclick = function(e) {
|
114 |
-
e = e || event;
|
115 |
-
if (e.stopPropagation) { e.stopPropagation(); } else e.cancelBubble = true;
|
116 |
-
self.VKI_show(this.elem);
|
117 |
-
};
|
118 |
-
elem.parentNode.insertBefore(keybut, (elem.dir == "rtl") ? elem : elem.nextSibling);
|
119 |
-
} else {
|
120 |
-
elem.onfocus = function() {
|
121 |
-
if (self.VKI_target != this) {
|
122 |
-
if (self.VKI_target) self.VKI_close();
|
123 |
-
self.VKI_show(this);
|
124 |
-
}
|
125 |
-
};
|
126 |
-
elem.onclick = function() {
|
127 |
-
if (!self.VKI_target) self.VKI_show(this);
|
128 |
-
}
|
129 |
-
}
|
130 |
-
elem.setAttribute("VKI_attached", 'true');
|
131 |
-
if (self.VKI_isIE) {
|
132 |
-
elem.onclick = elem.onselect = elem.onkeyup = function(e) {
|
133 |
-
if ((e || event).type != "keyup" || !this.readOnly)
|
134 |
-
this.range = document.selection.createRange();
|
135 |
-
};
|
136 |
-
}
|
137 |
-
VKI_addListener(elem, 'click', function(e) {
|
138 |
-
if (self.VKI_target == this) {
|
139 |
-
e = e || event;
|
140 |
-
if (e.stopPropagation) { e.stopPropagation(); } else e.cancelBubble = true;
|
141 |
-
} return false;
|
142 |
-
}, false);
|
143 |
-
if (self.VKI_isMoz)
|
144 |
-
elem.addEventListener('blur', function() { this.setAttribute('_scrollTop', this.scrollTop); }, false);
|
145 |
-
};
|
146 |
-
|
147 |
-
|
148 |
-
/* ***** Find tagged input & textarea elements ***************** */
|
149 |
-
function VKI_buildkeybs() {
|
150 |
-
var inputElems = [
|
151 |
-
document.getElementsByTagName('input'),
|
152 |
-
document.getElementsByTagName('textarea')
|
153 |
-
];
|
154 |
-
for (var x = 0, elem; elem = inputElems[x++];)
|
155 |
-
for (var y = 0, ex; ex = elem[y++];)
|
156 |
-
if (ex.nodeName == "TEXTAREA" || ex.type == "text" || ex.type == "password")
|
157 |
-
if (ex.className.indexOf("keyb") > -1)
|
158 |
-
VKI_attach(ex);
|
159 |
-
|
160 |
-
VKI_addListener(document.documentElement, 'click', function(e) { self.VKI_close(); }, false);
|
161 |
-
}
|
162 |
-
|
163 |
-
|
164 |
-
/* ****************************************************************
|
165 |
-
* Common mouse event actions
|
166 |
-
*
|
167 |
-
*/
|
168 |
-
function VKI_mouseEvents(elem) {
|
169 |
-
if (elem.nodeName == "TD") {
|
170 |
-
if (!elem.click) elem.click = function() {
|
171 |
-
var evt = this.ownerDocument.createEvent('MouseEvents');
|
172 |
-
evt.initMouseEvent('click', true, true, this.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
|
173 |
-
this.dispatchEvent(evt);
|
174 |
-
};
|
175 |
-
elem.VKI_clickless = 0;
|
176 |
-
VKI_addListener(elem, 'dblclick', function() { return false; }, false);
|
177 |
-
}
|
178 |
-
VKI_addListener(elem, 'mouseover', function() {
|
179 |
-
if (this.nodeName == "TD" && self.VKI_clickless) {
|
180 |
-
var _self = this;
|
181 |
-
clearTimeout(this.VKI_clickless);
|
182 |
-
this.VKI_clickless = setTimeout(function() { _self.click(); }, self.VKI_clickless);
|
183 |
-
}
|
184 |
-
if (self.VKI_isIE) this.className += " hover";
|
185 |
-
}, false);
|
186 |
-
VKI_addListener(elem, 'mouseout', function() {
|
187 |
-
if (this.nodeName == "TD") clearTimeout(this.VKI_clickless);
|
188 |
-
if (self.VKI_isIE) this.className = this.className.replace(/ ?(hover|pressed) ?/g, "");
|
189 |
-
}, false);
|
190 |
-
VKI_addListener(elem, 'mousedown', function() {
|
191 |
-
if (this.nodeName == "TD") clearTimeout(this.VKI_clickless);
|
192 |
-
if (self.VKI_isIE) this.className += " pressed";
|
193 |
-
}, false);
|
194 |
-
VKI_addListener(elem, 'mouseup', function() {
|
195 |
-
if (this.nodeName == "TD") clearTimeout(this.VKI_clickless);
|
196 |
-
if (self.VKI_isIE) this.className = this.className.replace(/ ?pressed ?/g, "");
|
197 |
-
}, false);
|
198 |
-
}
|
199 |
-
|
200 |
-
|
201 |
-
/* ***** Build the keyboard interface ************************** */
|
202 |
-
this.VKI_keyboard = document.createElement('table');
|
203 |
-
this.VKI_keyboard.id = "keybMaster";
|
204 |
-
this.VKI_keyboard.dir = "ltr";
|
205 |
-
this.VKI_keyboard.cellSpacing = "0";
|
206 |
-
this.VKI_keyboard.reflow = function() {
|
207 |
-
this.style.width = "50px";
|
208 |
-
var foo = this.offsetWidth;
|
209 |
-
this.style.width = "";
|
210 |
-
};
|
211 |
-
VKI_addListener(this.VKI_keyboard, 'click', function(e) {
|
212 |
-
e = e || event;
|
213 |
-
if (e.stopPropagation) { e.stopPropagation(); } else e.cancelBubble = true;
|
214 |
-
return false;
|
215 |
-
}, false);
|
216 |
-
|
217 |
-
if (!this.VKI_layout[this.VKI_kt])
|
218 |
-
return alert('No keyboard named "' + this.VKI_kt + '"');
|
219 |
-
|
220 |
-
this.VKI_langCode = {};
|
221 |
-
var thead = document.createElement('thead');
|
222 |
-
var tr = document.createElement('tr');
|
223 |
-
var th = document.createElement('th');
|
224 |
-
th.colSpan = "2";
|
225 |
-
|
226 |
-
var kbSelect = document.createElement('div');
|
227 |
-
kbSelect.title = this.VKI_i18n['02'];
|
228 |
-
VKI_addListener(kbSelect, 'click', function() {
|
229 |
-
var ol = this.getElementsByTagName('ol')[0];
|
230 |
-
if (!ol.style.display) {
|
231 |
-
ol.style.display = "block";
|
232 |
-
var li = ol.getElementsByTagName('li');
|
233 |
-
for (var x = 0, scr = 0; x < li.length; x++) {
|
234 |
-
if (VKI_kt == li[x].firstChild.nodeValue) {
|
235 |
-
li[x].className = "selected";
|
236 |
-
scr = li[x].offsetTop - li[x].offsetHeight * 2;
|
237 |
-
} else li[x].className = "";
|
238 |
-
} setTimeout(function() { ol.scrollTop = scr; }, 0);
|
239 |
-
} else ol.style.display = "";
|
240 |
-
}, false);
|
241 |
-
kbSelect.appendChild(document.createTextNode(this.VKI_kt));
|
242 |
-
kbSelect.appendChild(document.createTextNode(this.VKI_isIElt8 ? " \u2193" : " \u25be"));
|
243 |
-
kbSelect.langCount = 0;
|
244 |
-
var ol = document.createElement('ol');
|
245 |
-
for (ktype in this.VKI_layout) {
|
246 |
-
if (typeof this.VKI_layout[ktype] == "object") {
|
247 |
-
if (!this.VKI_layout[ktype].lang) this.VKI_layout[ktype].lang = [];
|
248 |
-
for (var x = 0; x < this.VKI_layout[ktype].lang.length; x++)
|
249 |
-
this.VKI_langCode[this.VKI_layout[ktype].lang[x].toLowerCase().replace(/-/g, "_")] = ktype;
|
250 |
-
var li = document.createElement('li');
|
251 |
-
li.title = this.VKI_layout[ktype].name;
|
252 |
-
VKI_addListener(li, 'click', function(e) {
|
253 |
-
e = e || event;
|
254 |
-
if (e.stopPropagation) { e.stopPropagation(); } else e.cancelBubble = true;
|
255 |
-
this.parentNode.style.display = "";
|
256 |
-
self.VKI_kts = self.VKI_kt = kbSelect.firstChild.nodeValue = this.firstChild.nodeValue;
|
257 |
-
self.VKI_buildKeys();
|
258 |
-
self.VKI_position(true);
|
259 |
-
}, false);
|
260 |
-
VKI_mouseEvents(li);
|
261 |
-
li.appendChild(document.createTextNode(ktype));
|
262 |
-
ol.appendChild(li);
|
263 |
-
kbSelect.langCount++;
|
264 |
-
}
|
265 |
-
} kbSelect.appendChild(ol);
|
266 |
-
if (kbSelect.langCount > 1) th.appendChild(kbSelect);
|
267 |
-
this.VKI_langCode.index = [];
|
268 |
-
for (prop in this.VKI_langCode)
|
269 |
-
if (prop != "index" && typeof this.VKI_langCode[prop] == "string")
|
270 |
-
this.VKI_langCode.index.push(prop);
|
271 |
-
this.VKI_langCode.index.sort();
|
272 |
-
this.VKI_langCode.index.reverse();
|
273 |
-
|
274 |
-
if (this.VKI_numberPad) {
|
275 |
-
var span = document.createElement('span');
|
276 |
-
span.appendChild(document.createTextNode("اعداد"));
|
277 |
-
span.title = this.VKI_i18n['00'];
|
278 |
-
VKI_addListener(span, 'click', function() {
|
279 |
-
kbNumpad.style.display = (!kbNumpad.style.display) ? "none" : "";
|
280 |
-
self.VKI_position(true);
|
281 |
-
}, false);
|
282 |
-
VKI_mouseEvents(span);
|
283 |
-
th.appendChild(span);
|
284 |
-
}
|
285 |
-
|
286 |
-
this.VKI_kbsize = function(e) {
|
287 |
-
self.VKI_size = Math.min(5, Math.max(1, self.VKI_size));
|
288 |
-
self.VKI_keyboard.className = self.VKI_keyboard.className.replace(/ ?keybSize\d ?/, "");
|
289 |
-
if (self.VKI_size != 2) self.VKI_keyboard.className += " keybSize" + self.VKI_size;
|
290 |
-
self.VKI_position(true);
|
291 |
-
if (self.VKI_isOpera) self.VKI_keyboard.reflow();
|
292 |
-
};
|
293 |
-
if (this.VKI_sizeAdj) {
|
294 |
-
var small = document.createElement('small');
|
295 |
-
small.title = this.VKI_i18n['10'];
|
296 |
-
VKI_addListener(small, 'click', function() {
|
297 |
-
--self.VKI_size;
|
298 |
-
self.VKI_kbsize();
|
299 |
-
}, false);
|
300 |
-
VKI_mouseEvents(small);
|
301 |
-
small.appendChild(document.createTextNode(this.VKI_isIElt8 ? "\u2193" : "\u21d3"));
|
302 |
-
th.appendChild(small);
|
303 |
-
var big = document.createElement('big');
|
304 |
-
big.title = this.VKI_i18n['11'];
|
305 |
-
VKI_addListener(big, 'click', function() {
|
306 |
-
++self.VKI_size;
|
307 |
-
self.VKI_kbsize();
|
308 |
-
}, false);
|
309 |
-
VKI_mouseEvents(big);
|
310 |
-
big.appendChild(document.createTextNode(this.VKI_isIElt8 ? "\u2191" : "\u21d1"));
|
311 |
-
th.appendChild(big);
|
312 |
-
}
|
313 |
-
|
314 |
-
var span = document.createElement('span');
|
315 |
-
span.appendChild(document.createTextNode(this.VKI_i18n['07']));
|
316 |
-
span.title = this.VKI_i18n['08'];
|
317 |
-
VKI_addListener(span, 'click', function() {
|
318 |
-
self.VKI_target.value = "";
|
319 |
-
self.VKI_target.focus();
|
320 |
-
return false;
|
321 |
-
}, false);
|
322 |
-
VKI_mouseEvents(span);
|
323 |
-
th.appendChild(span);
|
324 |
-
|
325 |
-
var strong = document.createElement('strong');
|
326 |
-
strong.appendChild(document.createTextNode('X'));
|
327 |
-
strong.title = this.VKI_i18n['06'];
|
328 |
-
VKI_addListener(strong, 'click', function() { self.VKI_close(); }, false);
|
329 |
-
VKI_mouseEvents(strong);
|
330 |
-
th.appendChild(strong);
|
331 |
-
|
332 |
-
tr.appendChild(th);
|
333 |
-
thead.appendChild(tr);
|
334 |
-
this.VKI_keyboard.appendChild(thead);
|
335 |
-
|
336 |
-
var tbody = document.createElement('tbody');
|
337 |
-
var tr = document.createElement('tr');
|
338 |
-
var td = document.createElement('td');
|
339 |
-
var div = document.createElement('div');
|
340 |
-
|
341 |
-
if (this.VKI_deadBox) {
|
342 |
-
var label = document.createElement('label');
|
343 |
-
var checkbox = document.createElement('input');
|
344 |
-
checkbox.type = "checkbox";
|
345 |
-
checkbox.title = this.VKI_i18n['03'] + ": " + ((this.VKI_deadkeysOn) ? this.VKI_i18n['04'] : this.VKI_i18n['05']);
|
346 |
-
checkbox.defaultChecked = this.VKI_deadkeysOn;
|
347 |
-
VKI_addListener(checkbox, 'click', function() {
|
348 |
-
this.title = self.VKI_i18n['03'] + ": " + ((this.checked) ? self.VKI_i18n['04'] : self.VKI_i18n['05']);
|
349 |
-
self.VKI_modify("");
|
350 |
-
return true;
|
351 |
-
}, false);
|
352 |
-
label.appendChild(checkbox);
|
353 |
-
checkbox.checked = this.VKI_deadkeysOn;
|
354 |
-
div.appendChild(label);
|
355 |
-
this.VKI_deadkeysOn = checkbox;
|
356 |
-
} else this.VKI_deadkeysOn.checked = this.VKI_deadkeysOn;
|
357 |
-
|
358 |
-
if (this.VKI_showVersion) {
|
359 |
-
var vr = document.createElement('var');
|
360 |
-
vr.title = this.VKI_i18n['09'] + " " + this.VKI_version;
|
361 |
-
vr.appendChild(document.createTextNode("" + this.VKI_version));
|
362 |
-
div.appendChild(vr);
|
363 |
-
} td.appendChild(div);
|
364 |
-
tr.appendChild(td);
|
365 |
-
|
366 |
-
var kbNumpad = document.createElement('td');
|
367 |
-
kbNumpad.id = "keybNumpad";
|
368 |
-
if (!this.VKI_numberPadOn) kbNumpad.style.display = "none";
|
369 |
-
var ntable = document.createElement('table');
|
370 |
-
ntable.cellSpacing = "0";
|
371 |
-
var ntbody = document.createElement('tbody');
|
372 |
-
for (var x = 0; x < this.VKI_numpad.length; x++) {
|
373 |
-
var ntr = document.createElement('tr');
|
374 |
-
for (var y = 0; y < this.VKI_numpad[x].length; y++) {
|
375 |
-
var ntd = document.createElement('td');
|
376 |
-
VKI_addListener(ntd, 'click', VKI_keyClick, false);
|
377 |
-
VKI_mouseEvents(ntd);
|
378 |
-
ntd.appendChild(document.createTextNode(this.VKI_numpad[x][y]));
|
379 |
-
ntr.appendChild(ntd);
|
380 |
-
} ntbody.appendChild(ntr);
|
381 |
-
} ntable.appendChild(ntbody);
|
382 |
-
kbNumpad.appendChild(ntable);
|
383 |
-
tr.appendChild(kbNumpad);
|
384 |
-
tbody.appendChild(tr);
|
385 |
-
this.VKI_keyboard.appendChild(tbody);
|
386 |
-
|
387 |
-
if (this.VKI_isIE6) {
|
388 |
-
this.VKI_iframe = document.createElement('iframe');
|
389 |
-
this.VKI_iframe.style.position = "absolute";
|
390 |
-
this.VKI_iframe.style.border = "0px none";
|
391 |
-
this.VKI_iframe.style.filter = "mask()";
|
392 |
-
this.VKI_iframe.style.zIndex = "999999";
|
393 |
-
this.VKI_iframe.src = this.VKI_imageURI;
|
394 |
-
}
|
395 |
-
|
396 |
-
|
397 |
-
/* ****************************************************************
|
398 |
-
* Private table cell attachment function for generic characters
|
399 |
-
*
|
400 |
-
*/
|
401 |
-
function VKI_keyClick() {
|
402 |
-
var done = false, character = "\xa0";
|
403 |
-
if (this.firstChild.nodeName.toLowerCase() != "small") {
|
404 |
-
if ((character = this.firstChild.nodeValue) == "\xa0") return false;
|
405 |
-
} else character = this.firstChild.getAttribute('char');
|
406 |
-
if (self.VKI_deadkeysOn.checked && self.VKI_dead) {
|
407 |
-
if (self.VKI_dead != character) {
|
408 |
-
if (character != " ") {
|
409 |
-
if (self.VKI_deadkey[self.VKI_dead][character]) {
|
410 |
-
self.VKI_insert(self.VKI_deadkey[self.VKI_dead][character]);
|
411 |
-
done = true;
|
412 |
-
}
|
413 |
-
} else {
|
414 |
-
self.VKI_insert(self.VKI_dead);
|
415 |
-
done = true;
|
416 |
-
}
|
417 |
-
} else done = true;
|
418 |
-
} self.VKI_dead = false;
|
419 |
-
|
420 |
-
if (!done) {
|
421 |
-
if (self.VKI_deadkeysOn.checked && self.VKI_deadkey[character]) {
|
422 |
-
self.VKI_dead = character;
|
423 |
-
this.className += " dead";
|
424 |
-
if (self.VKI_shift) self.VKI_modify("Shift");
|
425 |
-
if (self.VKI_altgr) self.VKI_modify("AltGr");
|
426 |
-
} else self.VKI_insert(character);
|
427 |
-
} self.VKI_modify("");
|
428 |
-
return false;
|
429 |
-
}
|
430 |
-
|
431 |
-
|
432 |
-
/* ****************************************************************
|
433 |
-
* Build or rebuild the keyboard keys
|
434 |
-
*
|
435 |
-
*/
|
436 |
-
this.VKI_buildKeys = function() {
|
437 |
-
this.VKI_shift = this.VKI_shiftlock = this.VKI_altgr = this.VKI_altgrlock = this.VKI_dead = false;
|
438 |
-
var container = this.VKI_keyboard.tBodies[0].getElementsByTagName('div')[0];
|
439 |
-
var tables = container.getElementsByTagName('table');
|
440 |
-
for (var x = tables.length - 1; x >= 0; x--) container.removeChild(tables[x]);
|
441 |
-
|
442 |
-
for (var x = 0, hasDeadKey = false, lyt; lyt = this.VKI_layout[this.VKI_kt].keys[x++];) {
|
443 |
-
var table = document.createElement('table');
|
444 |
-
table.cellSpacing = "0";
|
445 |
-
if (lyt.length <= this.VKI_keyCenter) table.className = "keybCenter";
|
446 |
-
var tbody = document.createElement('tbody');
|
447 |
-
var tr = document.createElement('tr');
|
448 |
-
for (var y = 0, lkey; lkey = lyt[y++];) {
|
449 |
-
var td = document.createElement('td');
|
450 |
-
if (this.VKI_symbol[lkey[0]]) {
|
451 |
-
var text = this.VKI_symbol[lkey[0]].split("\n");
|
452 |
-
var small = document.createElement('small');
|
453 |
-
small.setAttribute('char', lkey[0]);
|
454 |
-
for (var z = 0; z < text.length; z++) {
|
455 |
-
if (z) small.appendChild(document.createElement("br"));
|
456 |
-
small.appendChild(document.createTextNode(text[z]));
|
457 |
-
} td.appendChild(small);
|
458 |
-
} else td.appendChild(document.createTextNode(lkey[0] || "\xa0"));
|
459 |
-
|
460 |
-
var className = [];
|
461 |
-
if (this.VKI_deadkeysOn.checked)
|
462 |
-
for (key in this.VKI_deadkey)
|
463 |
-
if (key === lkey[0]) { className.push("deadkey"); break; }
|
464 |
-
if (lyt.length > this.VKI_keyCenter && y == lyt.length) className.push("last");
|
465 |
-
if (lkey[0] == " " || lkey[1] == " ") className.push("space");
|
466 |
-
td.className = className.join(" ");
|
467 |
-
|
468 |
-
switch (lkey[1]) {
|
469 |
-
case "Caps": case "Shift":
|
470 |
-
case "Alt": case "AltGr": case "AltLk":
|
471 |
-
VKI_addListener(td, 'click', (function(type) { return function() { self.VKI_modify(type); return false; }})(lkey[1]), false);
|
472 |
-
break;
|
473 |
-
case "Tab":
|
474 |
-
VKI_addListener(td, 'click', function() {
|
475 |
-
if (self.VKI_activeTab) {
|
476 |
-
if (self.VKI_target.form) {
|
477 |
-
var target = self.VKI_target, elems = target.form.elements;
|
478 |
-
self.VKI_close();
|
479 |
-
for (var z = 0, me = false, j = -1; z < elems.length; z++) {
|
480 |
-
if (j == -1 && elems[z].getAttribute("VKI_attached")) j = z;
|
481 |
-
if (me) {
|
482 |
-
if (self.VKI_activeTab == 1 && elems[z]) break;
|
483 |
-
if (elems[z].getAttribute("VKI_attached")) break;
|
484 |
-
} else if (elems[z] == target) me = true;
|
485 |
-
} if (z == elems.length) z = Math.max(j, 0);
|
486 |
-
if (elems[z].getAttribute("VKI_attached")) {
|
487 |
-
self.VKI_show(elems[z]);
|
488 |
-
} else elems[z].focus();
|
489 |
-
} else self.VKI_target.focus();
|
490 |
-
} else self.VKI_insert("\t");
|
491 |
-
return false;
|
492 |
-
}, false);
|
493 |
-
break;
|
494 |
-
case "Bksp":
|
495 |
-
VKI_addListener(td, 'click', function() {
|
496 |
-
self.VKI_target.focus();
|
497 |
-
if (self.VKI_target.setSelectionRange && !self.VKI_target.readOnly) {
|
498 |
-
var rng = [self.VKI_target.selectionStart, self.VKI_target.selectionEnd];
|
499 |
-
if (rng[0] < rng[1]) rng[0]++;
|
500 |
-
self.VKI_target.value = self.VKI_target.value.substr(0, rng[0] - 1) + self.VKI_target.value.substr(rng[1]);
|
501 |
-
self.VKI_target.setSelectionRange(rng[0] - 1, rng[0] - 1);
|
502 |
-
} else if (self.VKI_target.createTextRange && !self.VKI_target.readOnly) {
|
503 |
-
try {
|
504 |
-
self.VKI_target.range.select();
|
505 |
-
} catch(e) { self.VKI_target.range = document.selection.createRange(); }
|
506 |
-
if (!self.VKI_target.range.text.length) self.VKI_target.range.moveStart('character', -1);
|
507 |
-
self.VKI_target.range.text = "";
|
508 |
-
} else self.VKI_target.value = self.VKI_target.value.substr(0, self.VKI_target.value.length - 1);
|
509 |
-
if (self.VKI_shift) self.VKI_modify("Shift");
|
510 |
-
if (self.VKI_altgr) self.VKI_modify("AltGr");
|
511 |
-
self.VKI_target.focus();
|
512 |
-
return true;
|
513 |
-
}, false);
|
514 |
-
break;
|
515 |
-
case "Enter":
|
516 |
-
VKI_addListener(td, 'click', function() {
|
517 |
-
if (self.VKI_target.nodeName != "TEXTAREA") {
|
518 |
-
if (self.VKI_enterSubmit && self.VKI_target.form) {
|
519 |
-
for (var z = 0, subm = false; z < self.VKI_target.form.elements.length; z++)
|
520 |
-
if (self.VKI_target.form.elements[z].type == "submit") subm = true;
|
521 |
-
if (!subm) self.VKI_target.form.submit();
|
522 |
-
}
|
523 |
-
self.VKI_close();
|
524 |
-
} else self.VKI_insert("\n");
|
525 |
-
return true;
|
526 |
-
}, false);
|
527 |
-
break;
|
528 |
-
default:
|
529 |
-
VKI_addListener(td, 'click', VKI_keyClick, false);
|
530 |
-
|
531 |
-
} VKI_mouseEvents(td);
|
532 |
-
tr.appendChild(td);
|
533 |
-
for (var z = 0; z < 4; z++)
|
534 |
-
if (this.VKI_deadkey[lkey[z] = lkey[z] || ""]) hasDeadKey = true;
|
535 |
-
} tbody.appendChild(tr);
|
536 |
-
table.appendChild(tbody);
|
537 |
-
container.appendChild(table);
|
538 |
-
}
|
539 |
-
if (this.VKI_deadBox)
|
540 |
-
this.VKI_deadkeysOn.style.display = (hasDeadKey) ? "inline" : "none";
|
541 |
-
if (this.VKI_isIE6) {
|
542 |
-
this.VKI_iframe.style.width = this.VKI_keyboard.offsetWidth + "px";
|
543 |
-
this.VKI_iframe.style.height = this.VKI_keyboard.offsetHeight + "px";
|
544 |
-
}
|
545 |
-
};
|
546 |
-
|
547 |
-
this.VKI_buildKeys();
|
548 |
-
VKI_addListener(this.VKI_keyboard, 'selectstart', function() { return false; }, false);
|
549 |
-
this.VKI_keyboard.unselectable = "on";
|
550 |
-
if (this.VKI_isOpera)
|
551 |
-
VKI_addListener(this.VKI_keyboard, 'mousedown', function() { return false; }, false);
|
552 |
-
|
553 |
-
|
554 |
-
/* ****************************************************************
|
555 |
-
* Controls modifier keys
|
556 |
-
*
|
557 |
-
*/
|
558 |
-
this.VKI_modify = function(type) {
|
559 |
-
switch (type) {
|
560 |
-
case "Alt":
|
561 |
-
case "AltGr": this.VKI_altgr = !this.VKI_altgr; break;
|
562 |
-
case "AltLk": this.VKI_altgr = 0; this.VKI_altgrlock = !this.VKI_altgrlock; break;
|
563 |
-
case "Caps": this.VKI_shift = 0; this.VKI_shiftlock = !this.VKI_shiftlock; break;
|
564 |
-
case "Shift": this.VKI_shift = !this.VKI_shift; break;
|
565 |
-
} var vchar = 0;
|
566 |
-
if (!this.VKI_shift != !this.VKI_shiftlock) vchar += 1;
|
567 |
-
if (!this.VKI_altgr != !this.VKI_altgrlock) vchar += 2;
|
568 |
-
|
569 |
-
var tables = this.VKI_keyboard.tBodies[0].getElementsByTagName('div')[0].getElementsByTagName('table');
|
570 |
-
for (var x = 0; x < tables.length; x++) {
|
571 |
-
var tds = tables[x].getElementsByTagName('td');
|
572 |
-
for (var y = 0; y < tds.length; y++) {
|
573 |
-
var className = [], lkey = this.VKI_layout[this.VKI_kt].keys[x][y];
|
574 |
-
|
575 |
-
switch (lkey[1]) {
|
576 |
-
case "Alt":
|
577 |
-
case "AltGr":
|
578 |
-
if (this.VKI_altgr) className.push("pressed");
|
579 |
-
break;
|
580 |
-
case "AltLk":
|
581 |
-
if (this.VKI_altgrlock) className.push("pressed");
|
582 |
-
break;
|
583 |
-
case "Shift":
|
584 |
-
if (this.VKI_shift) className.push("pressed");
|
585 |
-
break;
|
586 |
-
case "Caps":
|
587 |
-
if (this.VKI_shiftlock) className.push("pressed");
|
588 |
-
break;
|
589 |
-
case "Tab": case "Enter": case "Bksp": break;
|
590 |
-
default:
|
591 |
-
if (type) {
|
592 |
-
tds[y].removeChild(tds[y].firstChild);
|
593 |
-
if (this.VKI_symbol[lkey[vchar]]) {
|
594 |
-
var text = this.VKI_symbol[lkey[vchar]].split("\n");
|
595 |
-
var small = document.createElement('small');
|
596 |
-
small.setAttribute('char', lkey[vchar]);
|
597 |
-
for (var z = 0; z < text.length; z++) {
|
598 |
-
if (z) small.appendChild(document.createElement("br"));
|
599 |
-
small.appendChild(document.createTextNode(text[z]));
|
600 |
-
} tds[y].appendChild(small);
|
601 |
-
} else tds[y].appendChild(document.createTextNode(lkey[vchar] || "\xa0"));
|
602 |
-
}
|
603 |
-
if (this.VKI_deadkeysOn.checked) {
|
604 |
-
var character = tds[y].firstChild.nodeValue || tds[y].firstChild.className;
|
605 |
-
if (this.VKI_dead) {
|
606 |
-
if (character == this.VKI_dead) className.push("pressed");
|
607 |
-
if (this.VKI_deadkey[this.VKI_dead][character]) className.push("target");
|
608 |
-
}
|
609 |
-
if (this.VKI_deadkey[character]) className.push("deadkey");
|
610 |
-
}
|
611 |
-
}
|
612 |
-
|
613 |
-
if (y == tds.length - 1 && tds.length > this.VKI_keyCenter) className.push("last");
|
614 |
-
if (lkey[0] == " " || lkey[1] == " ") className.push("space");
|
615 |
-
tds[y].className = className.join(" ");
|
616 |
-
}
|
617 |
-
}
|
618 |
-
};
|
619 |
-
|
620 |
-
|
621 |
-
/* ****************************************************************
|
622 |
-
* Insert text at the cursor
|
623 |
-
*
|
624 |
-
*/
|
625 |
-
this.VKI_insert = function(text) {
|
626 |
-
this.VKI_target.focus();
|
627 |
-
if (this.VKI_target.maxLength) this.VKI_target.maxlength = this.VKI_target.maxLength;
|
628 |
-
if (typeof this.VKI_target.maxlength == "undefined" ||
|
629 |
-
this.VKI_target.maxlength < 0 ||
|
630 |
-
this.VKI_target.value.length < this.VKI_target.maxlength) {
|
631 |
-
if (this.VKI_target.setSelectionRange && !this.VKI_target.readOnly && !this.VKI_isIE) {
|
632 |
-
var rng = [this.VKI_target.selectionStart, this.VKI_target.selectionEnd];
|
633 |
-
this.VKI_target.value = this.VKI_target.value.substr(0, rng[0]) + text + this.VKI_target.value.substr(rng[1]);
|
634 |
-
if (text == "\n" && this.VKI_isOpera) rng[0]++;
|
635 |
-
this.VKI_target.setSelectionRange(rng[0] + text.length, rng[0] + text.length);
|
636 |
-
} else if (this.VKI_target.createTextRange && !this.VKI_target.readOnly) {
|
637 |
-
try {
|
638 |
-
this.VKI_target.range.select();
|
639 |
-
} catch(e) { this.VKI_target.range = document.selection.createRange(); }
|
640 |
-
this.VKI_target.range.text = text;
|
641 |
-
this.VKI_target.range.collapse(true);
|
642 |
-
this.VKI_target.range.select();
|
643 |
-
} else this.VKI_target.value += text;
|
644 |
-
if (this.VKI_shift) this.VKI_modify("Shift");
|
645 |
-
if (this.VKI_altgr) this.VKI_modify("AltGr");
|
646 |
-
this.VKI_target.focus();
|
647 |
-
} else if (this.VKI_target.createTextRange && this.VKI_target.range)
|
648 |
-
this.VKI_target.range.select();
|
649 |
-
};
|
650 |
-
|
651 |
-
|
652 |
-
/* ****************************************************************
|
653 |
-
* Show the keyboard interface
|
654 |
-
*
|
655 |
-
*/
|
656 |
-
this.VKI_show = function(elem) {
|
657 |
-
if (!this.VKI_target) {
|
658 |
-
this.VKI_target = elem;
|
659 |
-
if (this.VKI_langAdapt && this.VKI_target.lang) {
|
660 |
-
var chg = false, sub = [], lang = this.VKI_target.lang.toLowerCase().replace(/-/g, "_");
|
661 |
-
for (var x = 0, chg = false; !chg && x < this.VKI_langCode.index.length; x++)
|
662 |
-
if (lang.indexOf(this.VKI_langCode.index[x]) == 0)
|
663 |
-
chg = kbSelect.firstChild.nodeValue = this.VKI_kt = this.VKI_langCode[this.VKI_langCode.index[x]];
|
664 |
-
if (chg) this.VKI_buildKeys();
|
665 |
-
}
|
666 |
-
if (this.VKI_isIE) {
|
667 |
-
if (!this.VKI_target.range) {
|
668 |
-
this.VKI_target.range = this.VKI_target.createTextRange();
|
669 |
-
this.VKI_target.range.moveStart('character', this.VKI_target.value.length);
|
670 |
-
} this.VKI_target.range.select();
|
671 |
-
}
|
672 |
-
try { this.VKI_keyboard.parentNode.removeChild(this.VKI_keyboard); } catch (e) {}
|
673 |
-
if (this.VKI_clearPasswords && this.VKI_target.type == "password") this.VKI_target.value = "";
|
674 |
-
|
675 |
-
var elem = this.VKI_target;
|
676 |
-
this.VKI_target.keyboardPosition = "absolute";
|
677 |
-
do {
|
678 |
-
if (VKI_getStyle(elem, "position") == "fixed") {
|
679 |
-
this.VKI_target.keyboardPosition = "fixed";
|
680 |
-
break;
|
681 |
-
}
|
682 |
-
} while (elem = elem.offsetParent);
|
683 |
-
|
684 |
-
if (this.VKI_isIE6) document.body.appendChild(this.VKI_iframe);
|
685 |
-
document.body.appendChild(this.VKI_keyboard);
|
686 |
-
this.VKI_keyboard.style.position = this.VKI_target.keyboardPosition;
|
687 |
-
if (this.VKI_isOpera) this.VKI_keyboard.reflow();
|
688 |
-
|
689 |
-
this.VKI_position(true);
|
690 |
-
if (self.VKI_isMoz || self.VKI_isWebKit) this.VKI_position(true);
|
691 |
-
this.VKI_target.blur();
|
692 |
-
this.VKI_target.focus();
|
693 |
-
} else this.VKI_close();
|
694 |
-
};
|
695 |
-
|
696 |
-
|
697 |
-
/* ****************************************************************
|
698 |
-
* Position the keyboard
|
699 |
-
*
|
700 |
-
*/
|
701 |
-
this.VKI_position = function(force) {
|
702 |
-
if (self.VKI_target) {
|
703 |
-
var kPos = VKI_findPos(self.VKI_keyboard), wDim = VKI_innerDimensions(), sDis = VKI_scrollDist();
|
704 |
-
var place = false, fudge = self.VKI_target.offsetHeight + 3;
|
705 |
-
if (force !== true) {
|
706 |
-
if (kPos[1] + self.VKI_keyboard.offsetHeight - sDis[1] - wDim[1] > 0) {
|
707 |
-
place = true;
|
708 |
-
fudge = -self.VKI_keyboard.offsetHeight - 3;
|
709 |
-
} else if (kPos[1] - sDis[1] < 0) place = true;
|
710 |
-
}
|
711 |
-
if (place || force === true) {
|
712 |
-
var iPos = VKI_findPos(self.VKI_target), scr = self.VKI_target;
|
713 |
-
while (scr = scr.parentNode) {
|
714 |
-
if (scr == document.body) break;
|
715 |
-
if (scr.scrollHeight > scr.offsetHeight || scr.scrollWidth > scr.offsetWidth) {
|
716 |
-
if (!scr.getAttribute("VKI_scrollListener")) {
|
717 |
-
scr.setAttribute("VKI_scrollListener", true);
|
718 |
-
VKI_addListener(scr, 'scroll', function() { self.VKI_position(true); }, false);
|
719 |
-
} // Check if the input is in view
|
720 |
-
var pPos = VKI_findPos(scr), oTop = iPos[1] - pPos[1], oLeft = iPos[0] - pPos[0];
|
721 |
-
var top = oTop + self.VKI_target.offsetHeight;
|
722 |
-
var left = oLeft + self.VKI_target.offsetWidth;
|
723 |
-
var bottom = scr.offsetHeight - oTop - self.VKI_target.offsetHeight;
|
724 |
-
var right = scr.offsetWidth - oLeft - self.VKI_target.offsetWidth;
|
725 |
-
self.VKI_keyboard.style.display = (top < 0 || left < 0 || bottom < 0 || right < 0) ? "none" : "";
|
726 |
-
if (self.VKI_isIE6) self.VKI_iframe.style.display = (top < 0 || left < 0 || bottom < 0 || right < 0) ? "none" : "";
|
727 |
-
}
|
728 |
-
}
|
729 |
-
self.VKI_keyboard.style.top = iPos[1] - ((self.VKI_target.keyboardPosition == "fixed" && !self.VKI_isIE && !self.VKI_isMoz) ? sDis[1] : 0) + fudge + "px";
|
730 |
-
self.VKI_keyboard.style.left = Math.max(10, Math.min(wDim[0] - self.VKI_keyboard.offsetWidth - 25, iPos[0])) + "px";
|
731 |
-
if (self.VKI_isIE6) {
|
732 |
-
self.VKI_iframe.style.width = self.VKI_keyboard.offsetWidth + "px";
|
733 |
-
self.VKI_iframe.style.height = self.VKI_keyboard.offsetHeight + "px";
|
734 |
-
self.VKI_iframe.style.top = self.VKI_keyboard.style.top;
|
735 |
-
self.VKI_iframe.style.left = self.VKI_keyboard.style.left;
|
736 |
-
}
|
737 |
-
}
|
738 |
-
if (force === true) self.VKI_position();
|
739 |
-
}
|
740 |
-
};
|
741 |
-
|
742 |
-
|
743 |
-
/* ****************************************************************
|
744 |
-
* Close the keyboard interface
|
745 |
-
*
|
746 |
-
*/
|
747 |
-
this.VKI_close = VKI_close = function() {
|
748 |
-
if (this.VKI_target) {
|
749 |
-
try {
|
750 |
-
this.VKI_keyboard.parentNode.removeChild(this.VKI_keyboard);
|
751 |
-
if (this.VKI_isIE6) this.VKI_iframe.parentNode.removeChild(this.VKI_iframe);
|
752 |
-
} catch (e) {}
|
753 |
-
if (this.VKI_kt != this.VKI_kts) {
|
754 |
-
kbSelect.firstChild.nodeValue = this.VKI_kt = this.VKI_kts;
|
755 |
-
this.VKI_buildKeys();
|
756 |
-
} kbSelect.getElementsByTagName('ol')[0].style.display = "";;
|
757 |
-
this.VKI_target.focus();
|
758 |
-
if (this.VKI_isIE) {
|
759 |
-
setTimeout(function() { self.VKI_target = false; }, 0);
|
760 |
-
} else this.VKI_target = false;
|
761 |
-
}
|
762 |
-
};
|
763 |
-
|
764 |
-
|
765 |
-
/* ***** Private functions *************************************** */
|
766 |
-
function VKI_addListener(elem, type, func, cap) {
|
767 |
-
if (elem.addEventListener) {
|
768 |
-
elem.addEventListener(type, function(e) { func.call(elem, e); }, cap);
|
769 |
-
} else if (elem.attachEvent)
|
770 |
-
elem.attachEvent('on' + type, function() { func.call(elem); });
|
771 |
-
}
|
772 |
-
|
773 |
-
function VKI_findPos(obj) {
|
774 |
-
var curleft = curtop = 0, scr = obj;
|
775 |
-
while ((scr = scr.parentNode) && scr != document.body) {
|
776 |
-
curleft -= scr.scrollLeft || 0;
|
777 |
-
curtop -= scr.scrollTop || 0;
|
778 |
-
}
|
779 |
-
do {
|
780 |
-
curleft += obj.offsetLeft;
|
781 |
-
curtop += obj.offsetTop;
|
782 |
-
} while (obj = obj.offsetParent);
|
783 |
-
return [curleft, curtop];
|
784 |
-
}
|
785 |
-
|
786 |
-
function VKI_innerDimensions() {
|
787 |
-
if (self.innerHeight) {
|
788 |
-
return [self.innerWidth, self.innerHeight];
|
789 |
-
} else if (document.documentElement && document.documentElement.clientHeight) {
|
790 |
-
return [document.documentElement.clientWidth, document.documentElement.clientHeight];
|
791 |
-
} else if (document.body)
|
792 |
-
return [document.body.clientWidth, document.body.clientHeight];
|
793 |
-
return [0, 0];
|
794 |
-
}
|
795 |
-
|
796 |
-
function VKI_scrollDist() {
|
797 |
-
var html = document.getElementsByTagName('html')[0];
|
798 |
-
if (html.scrollTop && document.documentElement.scrollTop) {
|
799 |
-
return [html.scrollLeft, html.scrollTop];
|
800 |
-
} else if (html.scrollTop || document.documentElement.scrollTop) {
|
801 |
-
return [html.scrollLeft + document.documentElement.scrollLeft, html.scrollTop + document.documentElement.scrollTop];
|
802 |
-
} else if (document.body.scrollTop)
|
803 |
-
return [document.body.scrollLeft, document.body.scrollTop];
|
804 |
-
return [0, 0];
|
805 |
-
}
|
806 |
-
|
807 |
-
function VKI_getStyle(obj, styleProp) {
|
808 |
-
if (obj.currentStyle) {
|
809 |
-
var y = obj.currentStyle[styleProp];
|
810 |
-
} else if (window.getComputedStyle)
|
811 |
-
var y = window.getComputedStyle(obj, null)[styleProp];
|
812 |
-
return y;
|
813 |
-
}
|
814 |
-
|
815 |
-
|
816 |
-
VKI_addListener(window, 'resize', this.VKI_position, false);
|
817 |
-
VKI_addListener(window, 'scroll', this.VKI_position, false);
|
818 |
-
this.VKI_kbsize();
|
819 |
-
VKI_addListener(window, 'load', VKI_buildkeybs, false);
|
820 |
-
// VKI_addListener(window, 'load', function() {
|
821 |
-
// setTimeout(VKI_buildkeybs, 5);
|
822 |
-
// }, false);
|
823 |
-
})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/melli-code.js
ADDED
@@ -0,0 +1,539 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function cityName_by_melliCode_hannanstd (code){
|
2 |
+
if (code == "169")cityN = "استان آذربایجان شرقی - شهر آذر شهر";
|
3 |
+
if (code == "170")cityN = "استان آذربایجان شرقی - شهر اسکو";
|
4 |
+
if (code == "149" || code == "150")cityN = "استان آذربایجان شرقی - شهر اهر";
|
5 |
+
if (code == "171")cityN = "استان آذربایجان شرقی - شهر بستان آباد";
|
6 |
+
if (code == "168")cityN = "استان آذربایجان شرقی - شهر بناب";
|
7 |
+
if (code == "136" || code == "137" || code == "138")cityN = "استان آذربایجان شرقی - شهر تبریز";
|
8 |
+
if (code == "545")cityN = "استان آذربایجان شرقی - شهر ترکمانچای";
|
9 |
+
if (code == "505")cityN = "استان آذربایجان شرقی - شهر جلفا";
|
10 |
+
if (code == "636")cityN = "استان آذربایجان شرقی - شهر چاروایماق";
|
11 |
+
if (code == "164" || code == "165")cityN = "استان آذربایجان شرقی - شهر سراب";
|
12 |
+
if (code == "172")cityN = "استان آذربایجان شرقی - شهر شبستر";
|
13 |
+
if (code == "623")cityN = "استان آذربایجان شرقی - شهر صوفیان";
|
14 |
+
if (code == "506")cityN = "استان آذربایجان شرقی - شهر عجب شیر";
|
15 |
+
if (code == "519")cityN = "استان آذربایجان شرقی - شهر کلیبر";
|
16 |
+
if (code == "154" || code == "155")cityN = "استان آذربایجان شرقی - شهر مراغه";
|
17 |
+
if (code == "567")cityN = "استان آذربایجان شرقی - شهر ورزقان";
|
18 |
+
if (code == "173")cityN = "استان آذربایجان شرقی - شهر هریس";
|
19 |
+
if (code == "159" || code == "160")cityN = "استان آذربایجان شرقی - شهر هشترود";
|
20 |
+
if (code == "604")cityN = "استان آذربایجان شرقی - شهر هوراند";
|
21 |
+
if (code == "274" || code == "275")cityN = "استان آذربایجان غربی - شهر ارومیه";
|
22 |
+
if (code == "295")cityN = "استان آذربایجان غربی - شهر اشنویه";
|
23 |
+
if (code == "637")cityN = "استان آذربایجان غربی - شهر انزل";
|
24 |
+
if (code == "292")cityN = "استان آذربایجان غربی - شهر بوکان";
|
25 |
+
if (code == "492")cityN = "استان آذربایجان غربی - شهر پلدشت";
|
26 |
+
if (code == "289")cityN = "استان آذربایجان غربی - شهر پیرانشهر";
|
27 |
+
if (code == "677")cityN = "استان آذربایجان غربی - شهر تخت سلیمان";
|
28 |
+
if (code == "294")cityN = "استان آذربایجان غربی - شهر تکاب";
|
29 |
+
if (code == "493")cityN = "استان آذربایجان غربی - شهر چایپاره";
|
30 |
+
if (code == "279" || code == "280")cityN = "استان آذربایجان غربی - شهر خوی";
|
31 |
+
if (code == "288")cityN = "استان آذربایجان غربی - شهر سردشت";
|
32 |
+
if (code == "284" || code == "285")cityN = "استان آذربایجان غربی - شهر سلماس";
|
33 |
+
if (code == "638")cityN = "استان آذربایجان غربی - شهر سیلوانه";
|
34 |
+
if (code == "291")cityN = "استان آذربایجان غربی - شهر سیه چشمه(چالدران)";
|
35 |
+
if (code == "640")cityN = "استان آذربایجان غربی - شهر شوط";
|
36 |
+
if (code == "293")cityN = "استان آذربایجان غربی - شهر شاهین دژ";
|
37 |
+
if (code == "675")cityN = "استان آذربایجان غربی - شهر کشاورز";
|
38 |
+
if (code == "282" || code == "283")cityN = "استان آذربایجان غربی - شهر ماکو";
|
39 |
+
if (code == "286" || code == "287")cityN = "استان آذربایجان غربی - شهر مهاباد";
|
40 |
+
if (code == "296" || code == "297")cityN = "استان آذربایجان غربی - شهر میاندوآب";
|
41 |
+
if (code == "290")cityN = "استان آذربایجان غربی - شهر نقده";
|
42 |
+
if (code == "400" || code == "401")cityN = "استان همدان - شهر اسدآباد";
|
43 |
+
if (code == "404" || code == "405")cityN = "استان همدان - شهر بهار";
|
44 |
+
if (code == "397")cityN = "استان همدان - شهر تویسرکان";
|
45 |
+
if (code == "398" || code == "399")cityN = "استان همدان - شهر رزن";
|
46 |
+
if (code == "647")cityN = "استان همدان - شهر شراء و پیشخوار";
|
47 |
+
if (code == "502")cityN = "استان همدان - شهر فامنین";
|
48 |
+
if (code == "584")cityN = "استان همدان - شهر قلقل رود";
|
49 |
+
if (code == "402" || code == "403")cityN = "استان همدان - شهر کبودرآهنگ";
|
50 |
+
if (code == "392" || code == "393")cityN = "استان همدان - شهر ملایر";
|
51 |
+
if (code == "395" || code == "396")cityN = "استان همدان - شهر نهاوند";
|
52 |
+
if (code == "386" || code == "387")cityN = "استان همدان - شهر همدان";
|
53 |
+
if (code == "503")cityN = "استان یزد - شهر ابرکوه";
|
54 |
+
if (code == "444")cityN = "استان یزد - شهر اردکان";
|
55 |
+
if (code == "551")cityN = "استان یزد - شهر اشکذر";
|
56 |
+
if (code == "447")cityN = "استان یزد - شهر بافق";
|
57 |
+
if (code == "561")cityN = "استان یزد - شهر بهاباد";
|
58 |
+
if (code == "445")cityN = "استان یزد - شهر تفت";
|
59 |
+
if (code == "718")cityN = "استان یزد - شهر دستگردان";
|
60 |
+
if (code == "083")cityN = "استان یزد - شهر طبس";
|
61 |
+
if (code == "446")cityN = "استان یزد - شهر مهریز";
|
62 |
+
if (code == "448")cityN = "استان یزد - شهر میبد";
|
63 |
+
if (code == "552")cityN = "استان یزد - شهر نیر";
|
64 |
+
if (code == "543")cityN = "استان یزد - شهر هرات و مروست";
|
65 |
+
if (code == "442" || code == "443")cityN = "استان یزد - شهر یزد";
|
66 |
+
if (code == "051")cityN = "استان مرکزی - شهر آشتیان";
|
67 |
+
if (code == "052" || code == "053")cityN = "استان مرکزی - شهر اراک";
|
68 |
+
if (code == "058")cityN = "استان مرکزی - شهر تفرش";
|
69 |
+
if (code == "055")cityN = "استان مرکزی - شهر خمین";
|
70 |
+
if (code == "617")cityN = "استان مرکزی - شهر خنداب";
|
71 |
+
if (code == "057")cityN = "استان مرکزی - شهر دلیجان";
|
72 |
+
if (code == "618")cityN = "استان مرکزی - شهر زرند مرکزی";
|
73 |
+
if (code == "059" || code == "060")cityN = "استان مرکزی - شهر ساوه";
|
74 |
+
if (code == "061" || code == "062")cityN = "استان مرکزی - شهر سربند";
|
75 |
+
if (code == "544")cityN = "استان مرکزی - شهر فراهان";
|
76 |
+
if (code == "056")cityN = "استان مرکزی - شهر محلات";
|
77 |
+
if (code == "571")cityN = "استان مرکزی - شهر وفس";
|
78 |
+
if (code == "593")cityN = "استان مرکزی - شهر هندودر";
|
79 |
+
if (code == "667")cityN = "استان هرمزگان - شهر ابوموسی";
|
80 |
+
if (code == "348")cityN = "استان هرمزگان - شهر بستک";
|
81 |
+
if (code == "586")cityN = "استان هرمزگان - شهر بشاگرد";
|
82 |
+
if (code == "338" || code == "339")cityN = "استان هرمزگان - شهر بندرعباس";
|
83 |
+
if (code == "343" || code == "344")cityN = "استان هرمزگان - شهر بندرلنگه";
|
84 |
+
if (code == "346")cityN = "استان هرمزگان - شهر جاسک";
|
85 |
+
if (code == "337")cityN = "استان هرمزگان - شهر حاجی آباد";
|
86 |
+
if (code == "554")cityN = "استان هرمزگان - شهر خمیر";
|
87 |
+
if (code == "469")cityN = "استان هرمزگان - شهر رودان";
|
88 |
+
if (code == "537")cityN = "استان هرمزگان - شهر فین";
|
89 |
+
if (code == "345")cityN = "استان هرمزگان - شهر قشم";
|
90 |
+
if (code == "470")cityN = "استان هرمزگان - شهر گاوبندی";
|
91 |
+
if (code == "341" || code == "342")cityN = "استان هرمزگان - شهر میناب";
|
92 |
+
if (code == "483" || code == "484")cityN = "استان لرستان - شهر ازنا";
|
93 |
+
if (code == "557")cityN = "استان لرستان - شهر اشترینان";
|
94 |
+
if (code == "418")cityN = "استان لرستان - شهر الشتر";
|
95 |
+
if (code == "416" || code == "417")cityN = "استان لرستان - شهر الیگودرز";
|
96 |
+
if (code == "412" || code == "413")cityN = "استان لرستان - شهر بروجرد";
|
97 |
+
if (code == "592")cityN = "استان لرستان - شهر پاپی";
|
98 |
+
if (code == "612")cityN = "استان لرستان - شهر چغلوندی";
|
99 |
+
if (code == "613")cityN = "استان لرستان - شهر چگنی";
|
100 |
+
if (code == "406" || code == "407")cityN = "استان لرستان - شهر خرم آباد";
|
101 |
+
if (code == "421")cityN = "استان لرستان - شهر دورود";
|
102 |
+
if (code == "598")cityN = "استان لرستان - شهر رومشکان";
|
103 |
+
if (code == "419")cityN = "استان لرستان - شهر کوهدشت";
|
104 |
+
if (code == "385")cityN = "استان لرستان - شهر ملاوی(پلدختر)";
|
105 |
+
if (code == "420")cityN = "استان لرستان - شهر نورآباد(دلفان)";
|
106 |
+
if (code == "528")cityN = "استان لرستان - شهر ویسیان";
|
107 |
+
if (code == "213" || code == "214")cityN = "استان مازندران - شهر آمل";
|
108 |
+
if (code == "205" || code == "206")cityN = "استان مازندران - شهر بابل";
|
109 |
+
if (code == "498")cityN = "استان مازندران - شهر بابل";
|
110 |
+
if (code == "568")cityN = "استان مازندران - شهر بندپی";
|
111 |
+
if (code == "711")cityN = "استان مازندران - شهر بندپی شرقی";
|
112 |
+
if (code == "217" || code == "218")cityN = "استان مازندران - شهر بهشهر";
|
113 |
+
if (code == "221")cityN = "استان مازندران - شهر تنکابن";
|
114 |
+
if (code == "582")cityN = "استان مازندران - شهر جویبار";
|
115 |
+
if (code == "483")cityN = "استان مازندران - شهر چالوس";
|
116 |
+
if (code == "625")cityN = "استان مازندران - شهر چمستان";
|
117 |
+
if (code == "576")cityN = "استان مازندران - شهر چهاردانگه";
|
118 |
+
if (code == "578")cityN = "استان مازندران - شهر دودانگه";
|
119 |
+
if (code == "227")cityN = "استان مازندران - شهر رامسر";
|
120 |
+
if (code == "208" || code == "209")cityN = "استان مازندران - شهر ساری";
|
121 |
+
if (code == "225")cityN = "استان مازندران - شهر سوادکوه";
|
122 |
+
if (code == "577")cityN = "استان مازندران - شهر شیرگاه";
|
123 |
+
if (code == "712")cityN = "استان مازندران - شهر عباس آباد";
|
124 |
+
if (code == "215" || code == "216")cityN = "استان مازندران - شهر قائمشهر";
|
125 |
+
if (code == "626")cityN = "استان مازندران - شهر کجور";
|
126 |
+
if (code == "627")cityN = "استان مازندران - شهر کلاردشت";
|
127 |
+
if (code == "579")cityN = "استان مازندران - شهر گلوگاه";
|
128 |
+
if (code == "713")cityN = "استان مازندران - شهر میاندورود";
|
129 |
+
if (code == "499")cityN = "استان مازندران - شهر نکاء";
|
130 |
+
if (code == "222")cityN = "استان مازندران - شهر نور";
|
131 |
+
if (code == "219" || code == "220")cityN = "استان مازندران - شهر نوشهر";
|
132 |
+
if (code == "500" || code == "501")cityN = "استان مازندران - شهر هراز و محمودآباد";
|
133 |
+
if (code == "623")cityN = "استان گلستان - شهر آزادشهر";
|
134 |
+
if (code == "497")cityN = "استان گلستان - شهر آق قلا";
|
135 |
+
if (code == "223")cityN = "استان گلستان - شهر بندرترکمن";
|
136 |
+
if (code == "689")cityN = "استان گلستان - شهر بندرگز";
|
137 |
+
if (code == "487")cityN = "استان گلستان - شهر رامیان";
|
138 |
+
if (code == "226")cityN = "استان گلستان - شهر علی آباد";
|
139 |
+
if (code == "224")cityN = "استان گلستان - شهر کردکوی";
|
140 |
+
if (code == "386")cityN = "استان گلستان - شهر کلاله";
|
141 |
+
if (code == "211" || code == "212")cityN = "استان گلستان - شهر گرگان";
|
142 |
+
if (code == "628")cityN = "استان گلستان - شهر گمیشان";
|
143 |
+
if (code == "202" || code == "203")cityN = "استان گلستان - شهر گنبد کاووس";
|
144 |
+
if (code == "531")cityN = "استان گلستان - شهر مراوه تپه";
|
145 |
+
if (code == "288")cityN = "استان گلستان - شهر مینودشت";
|
146 |
+
if (code == "261")cityN = "استان گیلان - شهر آستارا";
|
147 |
+
if (code == "273")cityN = "استان گیلان - شهر آستانه";
|
148 |
+
if (code == "630")cityN = "استان گیلان - شهر املش";
|
149 |
+
if (code == "264")cityN = "استان گیلان - شهر بندرانزلی";
|
150 |
+
if (code == "518")cityN = "استان گیلان - شهر خمام";
|
151 |
+
if (code == "631")cityN = "استان گیلان - شهر رحیم آباد";
|
152 |
+
if (code == "258" || code == "259")cityN = "استان گیلان - شهر رشت";
|
153 |
+
if (code == "570")cityN = "استان گیلان - شهر رضوانشهر";
|
154 |
+
if (code == "265")cityN = "استان گیلان - شهر رودبار";
|
155 |
+
if (code == "268" || code == "269")cityN = "استان گیلان - شهر رودسر";
|
156 |
+
if (code == "653")cityN = "استان گیلان - شهر سنگر";
|
157 |
+
if (code == "517")cityN = "استان گیلان - شهر سیاهکل";
|
158 |
+
if (code == "569")cityN = "استان گیلان - شهر شفت";
|
159 |
+
if (code == "267")cityN = "استان گیلان - شهر صومعه سرا";
|
160 |
+
if (code == "262" || code == "263")cityN = "استان گیلان - شهر طالش";
|
161 |
+
if (code == "593")cityN = "استان گیلان - شهر عمارلو";
|
162 |
+
if (code == "266")cityN = "استان گیلان - شهر فومن";
|
163 |
+
if (code == "693")cityN = "استان گیلان - شهر کوچصفهان";
|
164 |
+
if (code == "271" || code == "272")cityN = "استان گیلان - شهر لاهیجان";
|
165 |
+
if (code == "694")cityN = "استان گیلان - شهر لشت نشاء";
|
166 |
+
if (code == "270")cityN = "استان گیلان - شهر لنگرود";
|
167 |
+
if (code == "516")cityN = "استان گیلان - شهر ماسال و شاندرمن";
|
168 |
+
if (code == "333" || code == "334")cityN = "استان کرمانشاه - شهر اسلام آباد";
|
169 |
+
if (code == "691")cityN = "استان کرمانشاه - شهر باینگان";
|
170 |
+
if (code == "322" || code == "323")cityN = "استان کرمانشاه - شهر پاوه";
|
171 |
+
if (code == "595")cityN = "استان کرمانشاه - شهر ثلاث باباجانی";
|
172 |
+
if (code == "395")cityN = "استان کرمانشاه - شهر جوانرود";
|
173 |
+
if (code == "641")cityN = "استان کرمانشاه - شهر حمیل";
|
174 |
+
if (code == "596")cityN = "استان کرمانشاه - شهر روانسر";
|
175 |
+
if (code == "336")cityN = "استان کرمانشاه - شهر سرپل ذهاب";
|
176 |
+
if (code == "335")cityN = "استان کرمانشاه - شهر سنقر";
|
177 |
+
if (code == "496")cityN = "استان کرمانشاه - شهر صحنه";
|
178 |
+
if (code == "337")cityN = "استان کرمانشاه - شهر قصرشیرین";
|
179 |
+
if (code == "324" || code == "325")cityN = "استان کرمانشاه - شهر کرمانشاه";
|
180 |
+
if (code == "394")cityN = "استان کرمانشاه - شهر کرند";
|
181 |
+
if (code == "330")cityN = "استان کرمانشاه - شهر کنگاور";
|
182 |
+
if (code == "332")cityN = "استان کرمانشاه - شهر گیلانغرب";
|
183 |
+
if (code == "331")cityN = "استان کرمانشاه - شهر هرسین";
|
184 |
+
if (code == "687")cityN = "استان کهکیلویه و بویراحمد - شهر باشت";
|
185 |
+
if (code == "422" || code == "423")cityN = "استان کهکیلویه و بویراحمد - شهر بویراحمد(یاسوج)";
|
186 |
+
if (code == "599")cityN = "استان کهکیلویه و بویراحمد - شهر بهمنی";
|
187 |
+
if (code == "600")cityN = "استان کهکیلویه و بویراحمد - شهر چاروسا";
|
188 |
+
if (code == "688")cityN = "استان کهکیلویه و بویراحمد - شهر دروهان";
|
189 |
+
if (code == "424" || code == "425")cityN = "استان کهکیلویه و بویراحمد - شهر کهکیلویه(دهدشت)";
|
190 |
+
if (code == "426")cityN = "استان کهکیلویه و بویراحمد - شهر گچساران(دوگنبدان)";
|
191 |
+
if (code == "550")cityN = "استان کهکیلویه و بویراحمد - شهر لنده";
|
192 |
+
if (code == "697")cityN = "استان کهکیلویه و بویراحمد - شهر مارگون";
|
193 |
+
if (code == "384")cityN = "استان کردستان - شهر بانه";
|
194 |
+
if (code == "377" || code == "378")cityN = "استان کردستان - شهر بیجار";
|
195 |
+
if (code == "558")cityN = "استان کردستان - شهر دهگلان";
|
196 |
+
if (code == "385")cityN = "استان کردستان - شهر دیواندره";
|
197 |
+
if (code == "646")cityN = "استان کردستان - شهر سروآباد";
|
198 |
+
if (code == "375" || code == "376")cityN = "استان کردستان - شهر سقز";
|
199 |
+
if (code == "372" || code == "373")cityN = "استان کردستان - شهر سنندج";
|
200 |
+
if (code == "379" || code == "380")cityN = "استان کردستان - شهر قروه";
|
201 |
+
if (code == "383")cityN = "استان کردستان - شهر کامیاران";
|
202 |
+
if (code == "674")cityN = "استان کردستان - شهر کرانی";
|
203 |
+
if (code == "381" || code == "382")cityN = "استان کردستان - شهر مریوان";
|
204 |
+
if (code == "676")cityN = "استان کردستان - شهر نمشیر";
|
205 |
+
if (code == "722")cityN = "استان کرمان - شهر ارزونیه";
|
206 |
+
if (code == "542")cityN = "استان کرمان - شهر انار";
|
207 |
+
if (code == "312" || code == "313")cityN = "استان کرمان - شهر بافت";
|
208 |
+
if (code == "317")cityN = "استان کرمان - شهر بردسیر";
|
209 |
+
if (code == "310" || code == "311")cityN = "استان کرمان - شهر بم";
|
210 |
+
if (code == "302" || code == "303")cityN = "استان کرمان - شهر جیرفت";
|
211 |
+
if (code == "583")cityN = "استان کرمان - شهر رابر";
|
212 |
+
if (code == "321")cityN = "استان کرمان - شهر راور";
|
213 |
+
if (code == "382")cityN = "استان کرمان - شهر راین";
|
214 |
+
if (code == "304" || code == "305")cityN = "استان کرمان - شهر رفسنجان";
|
215 |
+
if (code == "536")cityN = "استان کرمان - شهر رودبار کهنوج";
|
216 |
+
if (code == "605")cityN = "استان کرمان - شهر ریگان";
|
217 |
+
if (code == "308" || code == "309")cityN = "استان کرمان - شهر زرند";
|
218 |
+
if (code == "306" || code == "307")cityN = "استان کرمان - شهر سیرجان";
|
219 |
+
if (code == "319")cityN = "استان کرمان - شهر شهداد";
|
220 |
+
if (code == "313" || code == "314")cityN = "استان کرمان - شهر شهربابک";
|
221 |
+
if (code == "606")cityN = "استان کرمان - شهر عنبرآباد";
|
222 |
+
if (code == "320")cityN = "استان کرمان - شهر فهرج";
|
223 |
+
if (code == "698")cityN = "استان کرمان - شهر قلعه گنج";
|
224 |
+
if (code == "298" || code == "299")cityN = "استان کرمان - شهر کرمان";
|
225 |
+
if (code == "535")cityN = "استان کرمان - شهر کوهبنان";
|
226 |
+
if (code == "315" || code == "316")cityN = "استان کرمان - شهر کهنوج";
|
227 |
+
if (code == "318")cityN = "استان کرمان - شهر گلباف";
|
228 |
+
if (code == "607")cityN = "استان کرمان - شهر ماهان";
|
229 |
+
if (code == "608")cityN = "استان کرمان - شهر منوجان";
|
230 |
+
if (code == "508")cityN = "استان قزوین - شهر آبیک";
|
231 |
+
if (code == "538")cityN = "استان قزوین - شهر آوج";
|
232 |
+
if (code == "728")cityN = "استان قزوین - شهر البرز";
|
233 |
+
if (code == "509")cityN = "استان قزوین - شهر بوئین زهرا";
|
234 |
+
if (code == "438" || code == "439")cityN = "استان قزوین - شهر تاکستان";
|
235 |
+
if (code == "580")cityN = "استان قزوین - شهر رودبار الموت";
|
236 |
+
if (code == "590")cityN = "استان قزوین - شهر رودبار شهرستان";
|
237 |
+
if (code == "559")cityN = "استان قزوین - شهر ضیاءآباد";
|
238 |
+
if (code == "588")cityN = "استان قزوین - شهر طارم سفلی";
|
239 |
+
if (code == "431" || code == "432")cityN = "استان قزوین - شهر قزوین";
|
240 |
+
if (code == "037" || code == "038")cityN = "استان قم - شهر قم";
|
241 |
+
if (code == "702")cityN = "استان قم - شهر کهک";
|
242 |
+
if (code == "240" || code == "241")cityN = "استان فارس - شهر آباده";
|
243 |
+
if (code == "670")cityN = "استان فارس - شهر آباده طشک";
|
244 |
+
if (code == "648")cityN = "استان فارس - شهر ارسنجان";
|
245 |
+
if (code == "252")cityN = "استان فارس - شهر استهبان";
|
246 |
+
if (code == "678")cityN = "استان فارس - شهر اشکنان";
|
247 |
+
if (code == "253")cityN = "استان فارس - شهر اقلید";
|
248 |
+
if (code == "649")cityN = "استان فارس - شهر اوز";
|
249 |
+
if (code == "513")cityN = "استان فارس - شهر بوانات";
|
250 |
+
if (code == "546")cityN = "استان فارس - شهر بیضا";
|
251 |
+
if (code == "671")cityN = "استان فارس - شهر جویم";
|
252 |
+
if (code == "246" || code == "247")cityN = "استان فارس - شهر جهرم";
|
253 |
+
if (code == "654")cityN = "استان فارس - شهر حاجی آباد(زرین دشت)";
|
254 |
+
if (code == "548")cityN = "استان فارس - شهر خرامه";
|
255 |
+
if (code == "547")cityN = "استان فارس - شهر خشت و کمارج";
|
256 |
+
if (code == "655")cityN = "استان فارس - شهر خفر";
|
257 |
+
if (code == "248" || code == "249")cityN = "استان فارس - شهر داراب";
|
258 |
+
if (code == "253")cityN = "استان فارس - شهر سپیدان";
|
259 |
+
if (code == "514")cityN = "استان فارس - شهر سروستان";
|
260 |
+
if (code == "665")cityN = "استان فارس - شهر سعادت آباد";
|
261 |
+
if (code == "673")cityN = "استان فارس - شهر شیبکوه";
|
262 |
+
if (code == "228" || code == "229" || code == "230")cityN = "استان فارس - شهر شیراز";
|
263 |
+
if (code == "679")cityN = "استان فارس - شهر فراشبند";
|
264 |
+
if (code == "256" || code == "257")cityN = "استان فارس - شهر فسا";
|
265 |
+
if (code == "244" || code == "245")cityN = "استان فارس - شهر فیروزآباد";
|
266 |
+
if (code == "681")cityN = "استان فارس - شهر قنقری(خرم بید)";
|
267 |
+
if (code == "723")cityN = "استان فارس - شهر قیروکارزین";
|
268 |
+
if (code == "236" || code == "237")cityN = "استان فارس - شهر کازرون";
|
269 |
+
if (code == "683")cityN = "استان فارس - شهر کوار";
|
270 |
+
if (code == "656")cityN = "استان فارس - شهر کراش";
|
271 |
+
if (code == "250" || code == "251")cityN = "استان فارس - شهر لارستان";
|
272 |
+
if (code == "515")cityN = "استان فارس - شهر لامرد";
|
273 |
+
if (code == "242" || code == "243")cityN = "استان فارس - شهر مرودشت";
|
274 |
+
if (code == "238" || code == "239")cityN = "استان فارس - شهر ممسنی";
|
275 |
+
if (code == "657")cityN = "استان فارس - شهر مهر";
|
276 |
+
if (code == "255")cityN = "استان فارس - شهر نی ریز";
|
277 |
+
if (code == "684")cityN = "استان سمنان - شهر ایوانکی";
|
278 |
+
if (code == "700")cityN = "استان سمنان - شهر بسطام";
|
279 |
+
if (code == "642")cityN = "استان سمنان - شهر بیارجمند";
|
280 |
+
if (code == "457")cityN = "استان سمنان - شهر دامغان";
|
281 |
+
if (code == "456")cityN = "استان سمنان - شهر سمنان";
|
282 |
+
if (code == "458" || code == "459")cityN = "استان سمنان - شهر شاهرود";
|
283 |
+
if (code == "460")cityN = "استان سمنان - شهر گرمسار";
|
284 |
+
if (code == "530")cityN = "استان سمنان - شهر مهدیشهر";
|
285 |
+
if (code == "520")cityN = "استان سمنان - شهر میامی";
|
286 |
+
if (code == "358" || code == "359")cityN = "استان سیستان و بلوچستان - شهر ایرانشهر";
|
287 |
+
if (code == "682")cityN = "استان سیستان و بلوچستان - شهر بزمان";
|
288 |
+
if (code == "703")cityN = "استان سیستان و بلوچستان - شهر بمپور";
|
289 |
+
if (code == "364" || code == "365")cityN = "استان سیستان و بلوچستان - شهر چابهار";
|
290 |
+
if (code == "371")cityN = "استان سیستان و بلوچستان - شهر خاش";
|
291 |
+
if (code == "701")cityN = "استان سیستان و بلوچستان - شهر دشتیاری";
|
292 |
+
if (code == "720")cityN = "استان سیستان و بلوچستان - شهر راسک";
|
293 |
+
if (code == "366" || code == "367")cityN = "استان سیستان و بلوچستان - شهر زابل";
|
294 |
+
if (code == "704")cityN = "استان سیستان و بلوچستان - شهر زابلی";
|
295 |
+
if (code == "361" || code == "362")cityN = "استان سیستان و بلوچستان - شهر زاهدان";
|
296 |
+
if (code == "369" || code == "370")cityN = "استان سیستان و بلوچستان - شهر سراوان";
|
297 |
+
if (code == "635")cityN = "استان سیستان و بلوچستان - شهر سرباز";
|
298 |
+
if (code == "668")cityN = "استان سیستان و بلوچستان - شهر سیب و سوران";
|
299 |
+
if (code == "533")cityN = "استان سیستان و بلوچستان - شهر شهرکی و ناروئی(زهک)";
|
300 |
+
if (code == "705")cityN = "استان سیستان و بلوچستان - شهر شیب آب";
|
301 |
+
if (code == "699")cityN = "استان سیستان و بلوچستان - شهر فنوج";
|
302 |
+
if (code == "669")cityN = "استان سیستان و بلوچستان - شهر قصرقند";
|
303 |
+
if (code == "725")cityN = "استان سیستان و بلوچستان - شهر کنارک";
|
304 |
+
if (code == "597")cityN = "استان سیستان و بلوچستان - شهر لاشار(اسپکه)";
|
305 |
+
if (code == "611")cityN = "استان سیستان و بلوچستان - شهر میرجاوه";
|
306 |
+
if (code == "525")cityN = "استان سیستان و بلوچستان - شهر نیک شهر";
|
307 |
+
if (code == "181")cityN = "استان خوزستان - شهر آبادان";
|
308 |
+
if (code == "527")cityN = "استان خوزستان - شهر آغاجاری";
|
309 |
+
if (code == "585")cityN = "استان خوزستان - شهر اروندکنار";
|
310 |
+
if (code == "685")cityN = "استان خوزستان - شهر امیدیه";
|
311 |
+
if (code == "663")cityN = "استان خوزستان - شهر اندیکا";
|
312 |
+
if (code == "192" || code == "193")cityN = "استان خوزستان - شهر اندیمشک";
|
313 |
+
if (code == "174" || code == "175")cityN = "استان خوزستان - شهر اهواز";
|
314 |
+
if (code == "183" || code == "184")cityN = "استان خوزستان - شهر ایذه";
|
315 |
+
if (code == "481")cityN = "استان خوزستان - شهر باغ ملک";
|
316 |
+
if (code == "706")cityN = "استان خوزستان - شهر بندر امام خمینی";
|
317 |
+
if (code == "194" || code == "195")cityN = "استان خوزستان - شهر بندرماهشهر";
|
318 |
+
if (code == "185" || code == "186")cityN = "استان خوزستان - شهر بهبهان";
|
319 |
+
if (code == "182")cityN = "استان خوزستان - شهر خرمشهر";
|
320 |
+
if (code == "199" || code == "200")cityN = "استان خوزستان - شهر دزفول";
|
321 |
+
if (code == "198")cityN = "استان خوزستان - شهر دشت آزادگان";
|
322 |
+
if (code == "662")cityN = "استان خوزستان - شهر رامشیر";
|
323 |
+
if (code == "190" || code == "191")cityN = "استان خوزستان - شهر رامهرمز";
|
324 |
+
if (code == "692")cityN = "استان خوزستان - شهر سردشت";
|
325 |
+
if (code == "189")cityN = "استان خوزستان - شهر شادگان";
|
326 |
+
if (code == "707")cityN = "استان خوزستان - شهر شاوور";
|
327 |
+
if (code == "526")cityN = "استان خوزستان - شهر شوش";
|
328 |
+
if (code == "187" || code == "188")cityN = "استان خوزستان - شهر شوشتر";
|
329 |
+
if (code == "729")cityN = "استان خوزستان - شهر گتوند";
|
330 |
+
if (code == "730")cityN = "استان خوزستان - شهر لالی";
|
331 |
+
if (code == "196" || code == "197")cityN = "استان خوزستان - شهر مسجدسلیمان";
|
332 |
+
if (code == "661")cityN = "استان خوزستان - شهر هندیجان";
|
333 |
+
if (code == "680")cityN = "استان خوزستان - شهر هویزه";
|
334 |
+
if (code == "643")cityN = "استان خراسان رضوی - شهر احمدآباد";
|
335 |
+
if (code == "562")cityN = "استان خراسان رضوی - شهر بجستان";
|
336 |
+
if (code == "572")cityN = "استان خراسان رضوی - شهر بردسکن";
|
337 |
+
if (code == "074")cityN = "استان خراسان رضوی - شهر تایباد";
|
338 |
+
if (code == "644")cityN = "استان خراسان رضوی - شهر تخت جلگه";
|
339 |
+
if (code == "072" || code == "073")cityN = "استان خراسان رضوی - شهر تربت جام";
|
340 |
+
if (code == "069" || code == "070")cityN = "استان خراسان رضوی - شهر تربت حیدریه";
|
341 |
+
if (code == "521")cityN = "استان خراسان رضوی - شهر جغتای";
|
342 |
+
if (code == "573")cityN = "استان خراسان رضوی - شهر جوین";
|
343 |
+
if (code == "522")cityN = "استان خراسان رضوی - شهر چناران";
|
344 |
+
if (code == "724")cityN = "استان خراسان رضوی - شهر خلیل آباد";
|
345 |
+
if (code == "076")cityN = "استان خراسان رضوی - شهر خواف";
|
346 |
+
if (code == "077")cityN = "استان خراسان رضوی - شهر درگز";
|
347 |
+
if (code == "650")cityN = "استان خراسان رضوی - شهر رشتخوار";
|
348 |
+
if (code == "574")cityN = "استان خراسان رضوی - شهر زبرخان";
|
349 |
+
if (code == "078" || code == "079")cityN = "استان خراسان رضوی - شهر سبزوار";
|
350 |
+
if (code == "081")cityN = "استان خراسان رضوی - شهر سرخس";
|
351 |
+
if (code == "084")cityN = "استان خراسان رضوی - شهر فریمان";
|
352 |
+
if (code == "651")cityN = "استان خراسان رضوی - شهر فیض آباد";
|
353 |
+
if (code == "086" || code == "087")cityN = "استان خراسان رضوی - شهر قوچان";
|
354 |
+
if (code == "089" || code == "090")cityN = "استان خراسان رضوی - شهر کاشمر";
|
355 |
+
if (code == "553")cityN = "استان خراسان رضوی - شهر کلات";
|
356 |
+
if (code == "091")cityN = "استان خراسان رضوی - شهر گناباد";
|
357 |
+
if (code == "092" || code == "093" || code == "094")cityN = "استان خراسان رضوی - شهر مشهد";
|
358 |
+
if (code == "097")cityN = "استان خراسان رضوی - شهر مشهد منطقه2";
|
359 |
+
if (code == "098")cityN = "استان خراسان رضوی - شهر مشهد منطقه3";
|
360 |
+
if (code == "096")cityN = "استان خراسان رضوی - شهر مشهد منطقه1";
|
361 |
+
if (code == "105" || code == "106")cityN = "استان خراسان رضوی - شهر نیشابور";
|
362 |
+
if (code == "063")cityN = "استان خراسان شمالی - شهر اسفراین";
|
363 |
+
if (code == "067" || code == "068")cityN = "استان خراسان شمالی - شهر بجنورد";
|
364 |
+
if (code == "075")cityN = "استان خراسان شمالی - شهر جاجرم";
|
365 |
+
if (code == "591")cityN = "استان خراسان شمالی - شهر رازوجرکلان";
|
366 |
+
if (code == "082")cityN = "استان خراسان شمالی - شهر شیروان";
|
367 |
+
if (code == "635")cityN = "استان خراسان شمالی - شهر فاروج";
|
368 |
+
if (code == "524")cityN = "استان خراسان شمالی - شهر مانه و سملقان";
|
369 |
+
if (code == "468")cityN = "استان چهارمحال و بختیاری - شهر اردل";
|
370 |
+
if (code == "465")cityN = "استان چهارمحال و بختیاری - شهر بروجن";
|
371 |
+
if (code == "461" || code == "462")cityN = "استان چهارمحال و بختیاری - شهر شهرکرد";
|
372 |
+
if (code == "467")cityN = "استان چهارمحال و بختیاری - شهر فارسان";
|
373 |
+
if (code == "555")cityN = "استان چهارمحال و بختیاری - شهر کوهرنگ";
|
374 |
+
if (code == "633")cityN = "استان چهارمحال و بختیاری - شهر کیار";
|
375 |
+
if (code == "629")cityN = "استان چهارمحال و بختیاری - شهر گندمان";
|
376 |
+
if (code == "466")cityN = "استان چهارمحال و بختیاری - شهر لردگان";
|
377 |
+
if (code == "696")cityN = "استان چهارمحال و بختیاری - شهر میانکوه";
|
378 |
+
if (code == "721")cityN = "استان خراسان جنوبی - شهر بشرویه";
|
379 |
+
if (code == "064" || code == "065")cityN = "استان خراسان جنوبی - شهر بیرجند";
|
380 |
+
if (code == "523")cityN = "استان خراسان جنوبی - شهر درمیان";
|
381 |
+
if (code == "652")cityN = "استان خراسان جنوبی - شهر زیرکوه";
|
382 |
+
if (code == "719")cityN = "استان خراسان جنوبی - شهر سرایان";
|
383 |
+
if (code == "716")cityN = "استان خراسان جنوبی - شهر سربیشه";
|
384 |
+
if (code == "085")cityN = "استان خراسان جنوبی - شهر فردوس";
|
385 |
+
if (code == "088")cityN = "استان خراسان جنوبی - شهر قائنات";
|
386 |
+
if (code == "563")cityN = "استان خراسان جنوبی - شهر نهبندان";
|
387 |
+
if (code == "529")cityN = "استان بوشهر - شهر بندر دیلم";
|
388 |
+
if (code == "353")cityN = "استان بوشهر - شهر بندر گناوه";
|
389 |
+
if (code == "349" || code == "350")cityN = "استان بوشهر - شهر بوشهر";
|
390 |
+
if (code == "355")cityN = "استان بوشهر - شهر تنگستان";
|
391 |
+
if (code == "609")cityN = "استان بوشهر - شهر جم";
|
392 |
+
if (code == "351" || code == "352")cityN = "استان بوشهر - شهر دشتستان";
|
393 |
+
if (code == "354")cityN = "استان بوشهر - شهر دشتی";
|
394 |
+
if (code == "732")cityN = "استان بوشهر - شهر دلوار";
|
395 |
+
if (code == "357")cityN = "استان بوشهر - شهر دیر";
|
396 |
+
if (code == "532")cityN = "استان بوشهر - شهر سعد آباد";
|
397 |
+
if (code == "610")cityN = "استان بوشهر - شهر شبانکاره";
|
398 |
+
if (code == "356")cityN = "استان بوشهر - شهر کنگان";
|
399 |
+
if (code == "556")cityN = "استان تهران - شهر اسلامشهر";
|
400 |
+
if (code == "658")cityN = "استان تهران - شهر پاکدشت";
|
401 |
+
if (code == "001" || code == "002" || code == "003" || code == "004" || code == "005" || code == "006" || code == "007" || code == "008")cityN = "استان تهران - شهر تهران مرکزی";
|
402 |
+
if (code == "011")cityN = "استان تهران - شهر تهران جنوب";
|
403 |
+
if (code == "020")cityN = "استان تهران - شهر تهران شرق";
|
404 |
+
if (code == "025")cityN = "استان تهران - شهر تهرانشمال";
|
405 |
+
if (code == "015")cityN = "استان تهران - شهر تهران غرب";
|
406 |
+
if (code == "043")cityN = "استان تهران - شهر دماوند";
|
407 |
+
if (code == "666")cityN = "استان تهران - شهر رباط کریم";
|
408 |
+
if (code == "489")cityN = "استان تهران - شهر ساوجبلاغ";
|
409 |
+
if (code == "044" || code == "045")cityN = "استان تهران - شهر شمیران";
|
410 |
+
if (code == "048" || code == "049")cityN = "استان تهران - شهر شهرری";
|
411 |
+
if (code == "490" || code == "491")cityN = "استان تهران - شهر شهریار";
|
412 |
+
if (code == "695")cityN = "استان تهران - شهر طالقان";
|
413 |
+
if (code == "659")cityN = "استان تهران - شهر فیروزکوه";
|
414 |
+
if (code == "031" || code == "032")cityN = "استان تهران - شهر کرج";
|
415 |
+
if (code == "664")cityN = "استان تهران - شهر کهریزک";
|
416 |
+
if (code == "717")cityN = "استان تهران - شهر نظرآباد";
|
417 |
+
if (code == "041" || code == "042")cityN = "استان تهران - شهر ورامین";
|
418 |
+
if (code == "471" || code == "472")cityN = " امور خارجه - امور خارجه";
|
419 |
+
if (code == "454")cityN = "استان ایلام - شهر آبدانان";
|
420 |
+
if (code == "581")cityN = "استان ایلام - شهر ارکوازی(ملکشاهی)";
|
421 |
+
if (code == "449" || code == "450")cityN = "استان ایلام - شهر ایلام";
|
422 |
+
if (code == "616")cityN = "استان ایلام - شهر ایوان";
|
423 |
+
if (code == "534")cityN = "استان ایلام - شهر بدره";
|
424 |
+
if (code == "455")cityN = "استان ایلام - شهر دره شهر";
|
425 |
+
if (code == "451")cityN = "استان ایلام - شهر دهلران";
|
426 |
+
if (code == "726")cityN = "استان ایلام - شهر زرین آباد";
|
427 |
+
if (code == "634")cityN = "استان ایلام - شهر شیروان لومار";
|
428 |
+
if (code == "453")cityN = "استان ایلام - شهر شیروان و چرداول";
|
429 |
+
if (code == "727")cityN = "استان ایلام - شهر موسیان";
|
430 |
+
if (code == "452")cityN = "استان ایلام - شهر مهران";
|
431 |
+
if (code == "145" || code == "146")cityN = "استان اردبیل - شهر اردبیل";
|
432 |
+
if (code == "731")cityN = "استان اردبیل - شهر ارشق";
|
433 |
+
if (code == "690")cityN = "استان اردبیل - شهر انگوت";
|
434 |
+
if (code == "601")cityN = "استان اردبیل - شهر بیله سوار";
|
435 |
+
if (code == "504")cityN = "استان اردبیل - شهر پارس آباد";
|
436 |
+
if (code == "163")cityN = "استان اردبیل - شهر خلخال";
|
437 |
+
if (code == "714")cityN = "استان اردبیل - شهر خورش رستم";
|
438 |
+
if (code == "715")cityN = "استان اردبیل - شهر سرعین";
|
439 |
+
if (code == "566")cityN = "استان اردبیل - شهر سنجبد(کوثر)";
|
440 |
+
if (code == "166" || code == "167")cityN = "استان اردبیل - شهر مشکین شهر";
|
441 |
+
if (code == "161" || code == "162")cityN = "استان اردبیل - شهر مغان";
|
442 |
+
if (code == "686")cityN = "استان اردبیل - شهر نمین";
|
443 |
+
if (code == "603")cityN = "استان اردبیل - شهر نیر";
|
444 |
+
if (code == "619")cityN = "استان اصفهان - شهر آران و بیدگل";
|
445 |
+
if (code == "118")cityN = "استان اصفهان - شهر اردستان";
|
446 |
+
if (code == "127" || code == "128" || code == "129")cityN = "استان اصفهان - شهر اصفهان";
|
447 |
+
if (code == "620")cityN = "استان اصفهان - شهر باغ بهادران";
|
448 |
+
if (code == "621")cityN = "استان اصفهان - شهر بوئین و میاندشت";
|
449 |
+
if (code == "549")cityN = "استان اصفهان - شهر تیران و کرون";
|
450 |
+
if (code == "564")cityN = "استان اصفهان - شهر جرقویه";
|
451 |
+
if (code == "575")cityN = "استان اصفهان - شهر چادگان";
|
452 |
+
if (code == "113" || code == "114")cityN = "استان اصفهان - شهر خمینی شهر";
|
453 |
+
if (code == "122")cityN = "استان اصفهان - شهر خوانسار";
|
454 |
+
if (code == "540")cityN = "استان اصفهان - شهر خور و بیابانک";
|
455 |
+
if (code == "660")cityN = "استان اصفهان - شهر دولت آباد";
|
456 |
+
if (code == "120")cityN = "استان اصفهان - شهر سمیرم";
|
457 |
+
if (code == "512")cityN = "استان اصفهان - شهر سمیرم سفلی (دهاقان)";
|
458 |
+
if (code == "510" || code == "511")cityN = "استان اصفهان - شهر شاهین شهر";
|
459 |
+
if (code == "119")cityN = "استان اصفهان - شهر شهرضا";
|
460 |
+
if (code == "115")cityN = "استان اصفهان - شهر فریدن";
|
461 |
+
if (code == "112")cityN = "استان اصفهان - شهر فریدونشهر";
|
462 |
+
if (code == "110" || code == "111")cityN = "استان اصفهان - شهر فلاورجان";
|
463 |
+
if (code == "125" || code == "126")cityN = "استان اصفهان - شهر کاشان";
|
464 |
+
if (code == "565")cityN = "استان اصفهان - شهر کوهپایه";
|
465 |
+
if (code == "121")cityN = "استان اصفهان - شهر گلپایگان";
|
466 |
+
if (code == "116" || code == "117")cityN = "استان اصفهان - شهر لنجان(زرینشهر)";
|
467 |
+
if (code == "541")cityN = "استان اصفهان - شهر مبارکه";
|
468 |
+
if (code == "622")cityN = "استان اصفهان - شهر میمه";
|
469 |
+
if (code == "124")cityN = "استان اصفهان - شهر نائین";
|
470 |
+
if (code == "108" || code == "109")cityN = "استان اصفهان - شهر نجف آباد";
|
471 |
+
if (code == "123")cityN = "استان اصفهان - شهر نطنز";
|
472 |
+
if (code == "427" || code == "428")cityN = "استان زنجان - شهر زنجان";
|
473 |
+
if (code == "507")cityN = "استان آذربایجان شرقی - شهر ملکان";
|
474 |
+
if (code == "158")cityN = "استان آذربایجان شرقی - شهر مرند";
|
475 |
+
if (code == "152" || code == "153")cityN = "استان آذربایجان شرقی - شهر میانه";
|
476 |
+
if (code == "615")cityN = "استان قزوین - شهر ابهر و خرمدره";
|
477 |
+
return cityN;
|
478 |
+
}
|
479 |
+
|
480 |
+
function melli_code_function(melli_code , field_id , message1 , message2 , message3 , is_seperate , show_city ) {
|
481 |
+
|
482 |
+
document.getElementById("city_" + field_id).innerHTML = '';
|
483 |
+
|
484 |
+
if (melli_code.value == '')
|
485 |
+
return false;
|
486 |
+
|
487 |
+
melli_code.value = melli_code.value.replace("-", "").replace("-", "");
|
488 |
+
|
489 |
+
if (melli_code.value.length == 8)
|
490 |
+
melli_code.value = '00' + melli_code.value;
|
491 |
+
|
492 |
+
if (melli_code.value.length == 9)
|
493 |
+
melli_code.value = '0' + melli_code.value;
|
494 |
+
|
495 |
+
if (isNaN(melli_code.value)) {
|
496 |
+
document.getElementById("city_" + field_id).innerHTML = message1;
|
497 |
+
return false;
|
498 |
+
}
|
499 |
+
|
500 |
+
if (melli_code.value.length > 10 || melli_code.value.length < 8) {
|
501 |
+
document.getElementById("city_" + field_id).innerHTML = message2;
|
502 |
+
return false;
|
503 |
+
}
|
504 |
+
|
505 |
+
var pre_check = ["0000000000", "1111111111", "2222222222", "3333333333", "4444444444", "5555555555", "6666666666", "7777777777", "8888888888", "9999999999"];
|
506 |
+
var indexOf = pre_check.indexOf(melli_code.value);
|
507 |
+
if (indexOf != '-1') {
|
508 |
+
document.getElementById("city_" + field_id).innerHTML = message3;
|
509 |
+
return false;
|
510 |
+
}
|
511 |
+
|
512 |
+
city = melli_code.value.substring(0, 3);
|
513 |
+
c = parseInt(melli_code.value.charAt(9));
|
514 |
+
n = parseInt(melli_code.value.charAt(0)) * 10 +
|
515 |
+
parseInt(melli_code.value.charAt(1)) * 9 +
|
516 |
+
parseInt(melli_code.value.charAt(2)) * 8 +
|
517 |
+
parseInt(melli_code.value.charAt(3)) * 7 +
|
518 |
+
parseInt(melli_code.value.charAt(4)) * 6 +
|
519 |
+
parseInt(melli_code.value.charAt(5)) * 5 +
|
520 |
+
parseInt(melli_code.value.charAt(6)) * 4 +
|
521 |
+
parseInt(melli_code.value.charAt(7)) * 3 +
|
522 |
+
parseInt(melli_code.value.charAt(8)) * 2;
|
523 |
+
r = n - parseInt(n / 11) * 11;
|
524 |
+
|
525 |
+
if ((r == 0 && r == c) || (r == 1 && c == 1) || (r > 1 && c == 11 - r)) {
|
526 |
+
if(is_seperate) {
|
527 |
+
if (melli_code.value.length == 10)
|
528 |
+
melli_code.value = melli_code.value.substring(0, 3) + "-" + melli_code.value.substring(3, 9) + "-" + melli_code.value.substring(9, 10);
|
529 |
+
}
|
530 |
+
if(show_city) {
|
531 |
+
document.getElementById("city_" + field_id).innerHTML = cityName_by_melliCode_hannanstd(city);
|
532 |
+
return true;
|
533 |
+
}
|
534 |
+
}
|
535 |
+
else {
|
536 |
+
document.getElementById("city_" + field_id).innerHTML = message3;
|
537 |
+
return false;
|
538 |
+
}
|
539 |
+
}
|
assets/js/melli-code.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
function cityName_by_melliCode_hannanstd(t){return"169"==t&&(cityN="استان آذربایجان شرقی - شهر آذر شهر"),"170"==t&&(cityN="استان آذربایجان شرقی - شهر اسکو"),("149"==t||"150"==t)&&(cityN="استان آذربایجان شرقی - شهر اهر"),"171"==t&&(cityN="استان آذربایجان شرقی - شهر بستان آباد"),"168"==t&&(cityN="استان آذربایجان شرقی - شهر بناب"),("136"==t||"137"==t||"138"==t)&&(cityN="استان آذربایجان شرقی - شهر تبریز"),"545"==t&&(cityN="استان آذربایجان شرقی - شهر ترکمانچای"),"505"==t&&(cityN="استان آذربایجان شرقی - شهر جلفا"),"636"==t&&(cityN="استان آذربایجان شرقی - شهر چاروایماق"),("164"==t||"165"==t)&&(cityN="استان آذربایجان شرقی - شهر سراب"),"172"==t&&(cityN="استان آذربایجان شرقی - شهر شبستر"),"623"==t&&(cityN="استان آذربایجان شرقی - شهر صوفیان"),"506"==t&&(cityN="استان آذربایجان شرقی - شهر عجب شیر"),"519"==t&&(cityN="استان آذربایجان شرقی - شهر کلیبر"),("154"==t||"155"==t)&&(cityN="استان آذربایجان شرقی - شهر مراغه"),"567"==t&&(cityN="استان آذربایجان شرقی - شهر ورزقان"),"173"==t&&(cityN="استان آذربایجان شرقی - شهر هریس"),("159"==t||"160"==t)&&(cityN="استان آذربایجان شرقی - شهر هشترود"),"604"==t&&(cityN="استان آذربایجان شرقی - شهر هوراند"),("274"==t||"275"==t)&&(cityN="استان آذربایجان غربی - شهر ارومیه"),"295"==t&&(cityN="استان آذربایجان غربی - شهر اشنویه"),"637"==t&&(cityN="استان آذربایجان غربی - شهر انزل"),"292"==t&&(cityN="استان آذربایجان غربی - شهر بوکان"),"492"==t&&(cityN="استان آذربایجان غربی - شهر پلدشت"),"289"==t&&(cityN="استان آذربایجان غربی - شهر پیرانشهر"),"677"==t&&(cityN="استان آذربایجان غربی - شهر تخت سلیمان"),"294"==t&&(cityN="استان آذربایجان غربی - شهر تکاب"),"493"==t&&(cityN="استان آذربایجان غربی - شهر چایپاره"),("279"==t||"280"==t)&&(cityN="استان آذربایجان غربی - شهر خوی"),"288"==t&&(cityN="استان آذربایجان غربی - شهر سردشت"),("284"==t||"285"==t)&&(cityN="استان آذربایجان غربی - شهر سلماس"),"638"==t&&(cityN="استان آذربایجان غربی - شهر سیلوانه"),"291"==t&&(cityN="استان آذربایجان غربی - شهر سیه چشمه(چالدران)"),"640"==t&&(cityN="استان آذربایجان غربی - شهر شوط"),"293"==t&&(cityN="استان آذربایجان غربی - شهر شاهین دژ"),"675"==t&&(cityN="استان آذربایجان غربی - شهر کشاورز"),("282"==t||"283"==t)&&(cityN="استان آذربایجان غربی - شهر ماکو"),("286"==t||"287"==t)&&(cityN="استان آذربایجان غربی - شهر مهاباد"),("296"==t||"297"==t)&&(cityN="استان آذربایجان غربی - شهر میاندوآب"),"290"==t&&(cityN="استان آذربایجان غربی - شهر نقده"),("400"==t||"401"==t)&&(cityN="استان همدان - شهر اسدآباد"),("404"==t||"405"==t)&&(cityN="استان همدان - شهر بهار"),"397"==t&&(cityN="استان همدان - شهر تویسرکان"),("398"==t||"399"==t)&&(cityN="استان همدان - شهر رزن"),"647"==t&&(cityN="استان همدان - شهر شراء و پیشخوار"),"502"==t&&(cityN="استان همدان - شهر فامنین"),"584"==t&&(cityN="استان همدان - شهر قلقل رود"),("402"==t||"403"==t)&&(cityN="استان همدان - شهر کبودرآهنگ"),("392"==t||"393"==t)&&(cityN="استان همدان - شهر ملایر"),("395"==t||"396"==t)&&(cityN="استان همدان - شهر نهاوند"),("386"==t||"387"==t)&&(cityN="استان همدان - شهر همدان"),"503"==t&&(cityN="استان یزد - شهر ابرکوه"),"444"==t&&(cityN="استان یزد - شهر اردکان"),"551"==t&&(cityN="استان یزد - شهر اشکذر"),"447"==t&&(cityN="استان یزد - شهر بافق"),"561"==t&&(cityN="استان یزد - شهر بهاباد"),"445"==t&&(cityN="استان یزد - شهر تفت"),"718"==t&&(cityN="استان یزد - شهر دستگردان"),"083"==t&&(cityN="استان یزد - شهر طبس"),"446"==t&&(cityN="استان یزد - شهر مهریز"),"448"==t&&(cityN="استان یزد - شهر میبد"),"552"==t&&(cityN="استان یزد - شهر نیر"),"543"==t&&(cityN="استان یزد - شهر هرات و مروست"),("442"==t||"443"==t)&&(cityN="استان یزد - شهر یزد"),"051"==t&&(cityN="استان مرکزی - شهر آشتیان"),("052"==t||"053"==t)&&(cityN="استان مرکزی - شهر اراک"),"058"==t&&(cityN="استان مرکزی - شهر تفرش"),"055"==t&&(cityN="استان مرکزی - شهر خمین"),"617"==t&&(cityN="استان مرکزی - شهر خنداب"),"057"==t&&(cityN="استان مرکزی - شهر دلیجان"),"618"==t&&(cityN="استان مرکزی - شهر زرند مرکزی"),("059"==t||"060"==t)&&(cityN="استان مرکزی - شهر ساوه"),("061"==t||"062"==t)&&(cityN="استان مرکزی - شهر سربند"),"544"==t&&(cityN="استان مرکزی - شهر فراهان"),"056"==t&&(cityN="استان مرکزی - شهر محلات"),"571"==t&&(cityN="استان مرکزی - شهر وفس"),"593"==t&&(cityN="استان مرکزی - شهر هندودر"),"667"==t&&(cityN="استان هرمزگان - شهر ابوموسی"),"348"==t&&(cityN="استان هرمزگان - شهر بستک"),"586"==t&&(cityN="استان هرمزگان - شهر بشاگرد"),("338"==t||"339"==t)&&(cityN="استان هرمزگان - شهر بندرعباس"),("343"==t||"344"==t)&&(cityN="استان هرمزگان - شهر بندرلنگه"),"346"==t&&(cityN="استان هرمزگان - شهر جاسک"),"337"==t&&(cityN="استان هرمزگان - شهر حاجی آباد"),"554"==t&&(cityN="استان هرمزگان - شهر خمیر"),"469"==t&&(cityN="استان هرمزگان - شهر رودان"),"537"==t&&(cityN="استان هرمزگان - شهر فین"),"345"==t&&(cityN="استان هرمزگان - شهر قشم"),"470"==t&&(cityN="استان هرمزگان - شهر گاوبندی"),("341"==t||"342"==t)&&(cityN="استان هرمزگان - شهر میناب"),("483"==t||"484"==t)&&(cityN="استان لرستان - شهر ازنا"),"557"==t&&(cityN="استان لرستان - شهر اشترینان"),"418"==t&&(cityN="استان لرستان - شهر الشتر"),("416"==t||"417"==t)&&(cityN="استان لرستان - شهر الیگودرز"),("412"==t||"413"==t)&&(cityN="استان لرستان - شهر بروجرد"),"592"==t&&(cityN="استان لرستان - شهر پاپی"),"612"==t&&(cityN="استان لرستان - شهر چغلوندی"),"613"==t&&(cityN="استان لرستان - شهر چگنی"),("406"==t||"407"==t)&&(cityN="استان لرستان - شهر خرم آباد"),"421"==t&&(cityN="استان لرستان - شهر دورود"),"598"==t&&(cityN="استان لرستان - شهر رومشکان"),"419"==t&&(cityN="استان لرستان - شهر کوهدشت"),"385"==t&&(cityN="استان لرستان - شهر ملاوی(پلدختر)"),"420"==t&&(cityN="استان لرستان - شهر نورآباد(دلفان)"),"528"==t&&(cityN="استان لرستان - شهر ویسیان"),("213"==t||"214"==t)&&(cityN="استان مازندران - شهر آمل"),("205"==t||"206"==t)&&(cityN="استان مازندران - شهر بابل"),"498"==t&&(cityN="استان مازندران - شهر بابل"),"568"==t&&(cityN="استان مازندران - شهر بندپی"),"711"==t&&(cityN="استان مازندران - شهر بندپی شرقی"),("217"==t||"218"==t)&&(cityN="استان مازندران - شهر بهشهر"),"221"==t&&(cityN="استان مازندران - شهر تنکابن"),"582"==t&&(cityN="استان مازندران - شهر جویبار"),"483"==t&&(cityN="استان مازندران - شهر چالوس"),"625"==t&&(cityN="استان مازندران - شهر چمستان"),"576"==t&&(cityN="استان مازندران - شهر چهاردانگه"),"578"==t&&(cityN="استان مازندران - شهر دودانگه"),"227"==t&&(cityN="استان مازندران - شهر رامسر"),("208"==t||"209"==t)&&(cityN="استان مازندران - شهر ساری"),"225"==t&&(cityN="استان مازندران - شهر سوادکوه"),"577"==t&&(cityN="استان مازندران - شهر شیرگاه"),"712"==t&&(cityN="استان مازندران - شهر عباس آباد"),("215"==t||"216"==t)&&(cityN="استان مازندران - شهر قائمشهر"),"626"==t&&(cityN="استان مازندران - شهر کجور"),"627"==t&&(cityN="استان مازندران - شهر کلاردشت"),"579"==t&&(cityN="استان مازندران - شهر گلوگاه"),"713"==t&&(cityN="استان مازندران - شهر میاندورود"),"499"==t&&(cityN="استان مازندران - شهر نکاء"),"222"==t&&(cityN="استان مازندران - شهر نور"),("219"==t||"220"==t)&&(cityN="استان مازندران - شهر نوشهر"),("500"==t||"501"==t)&&(cityN="استان مازندران - شهر هراز و محمودآباد"),"623"==t&&(cityN="استان گلستان - شهر آزادشهر"),"497"==t&&(cityN="استان گلستان - شهر آق قلا"),"223"==t&&(cityN="استان گلستان - شهر بندرترکمن"),"689"==t&&(cityN="استان گلستان - شهر بندرگز"),"487"==t&&(cityN="استان گلستان - شهر رامیان"),"226"==t&&(cityN="استان گلستان - شهر علی آباد"),"224"==t&&(cityN="استان گلستان - شهر کردکوی"),"386"==t&&(cityN="استان گلستان - شهر کلاله"),("211"==t||"212"==t)&&(cityN="استان گلستان - شهر گرگان"),"628"==t&&(cityN="استان گلستان - شهر گمیشان"),("202"==t||"203"==t)&&(cityN="استان گلستان - شهر گنبد کاووس"),"531"==t&&(cityN="استان گلستان - شهر مراوه تپه"),"288"==t&&(cityN="استان گلستان - شهر مینودشت"),"261"==t&&(cityN="استان گیلان - شهر آستارا"),"273"==t&&(cityN="استان گیلان - شهر آستانه"),"630"==t&&(cityN="استان گیلان - شهر املش"),"264"==t&&(cityN="استان گیلان - شهر بندرانزلی"),"518"==t&&(cityN="استان گیلان - شهر خمام"),"631"==t&&(cityN="استان گیلان - شهر رحیم آباد"),("258"==t||"259"==t)&&(cityN="استان گیلان - شهر رشت"),"570"==t&&(cityN="استان گیلان - شهر رضوانشهر"),"265"==t&&(cityN="استان گیلان - شهر رودبار"),("268"==t||"269"==t)&&(cityN="استان گیلان - شهر رودسر"),"653"==t&&(cityN="استان گیلان - شهر سنگر"),"517"==t&&(cityN="استان گیلان - شهر سیاهکل"),"569"==t&&(cityN="استان گیلان - شهر شفت"),"267"==t&&(cityN="استان گیلان - شهر صومعه سرا"),("262"==t||"263"==t)&&(cityN="استان گیلان - شهر طالش"),"593"==t&&(cityN="استان گیلان - شهر عمارلو"),"266"==t&&(cityN="استان گیلان - شهر فومن"),"693"==t&&(cityN="استان گیلان - شهر کوچصفهان"),("271"==t||"272"==t)&&(cityN="استان گیلان - شهر لاهیجان"),"694"==t&&(cityN="استان گیلان - شهر لشت نشاء"),"270"==t&&(cityN="استان گیلان - شهر لنگرود"),"516"==t&&(cityN="استان گیلان - شهر ماسال و شاندرمن"),("333"==t||"334"==t)&&(cityN="استان کرمانشاه - شهر اسلام آباد"),"691"==t&&(cityN="استان کرمانشاه - شهر باینگان"),("322"==t||"323"==t)&&(cityN="استان کرمانشاه - شهر پاوه"),"595"==t&&(cityN="استان کرمانشاه - شهر ثلاث باباجانی"),"395"==t&&(cityN="استان کرمانشاه - شهر جوانرود"),"641"==t&&(cityN="استان کرمانشاه - شهر حمیل"),"596"==t&&(cityN="استان کرمانشاه - شهر روانسر"),"336"==t&&(cityN="استان کرمانشاه - شهر سرپل ذهاب"),"335"==t&&(cityN="استان کرمانشاه - شهر سنقر"),"496"==t&&(cityN="استان کرمانشاه - شهر صحنه"),"337"==t&&(cityN="استان کرمانشاه - شهر قصرشیرین"),("324"==t||"325"==t)&&(cityN="استان کرمانشاه - شهر کرمانشاه"),"394"==t&&(cityN="استان کرمانشاه - شهر کرند"),"330"==t&&(cityN="استان کرمانشاه - شهر کنگاور"),"332"==t&&(cityN="استان کرمانشاه - شهر گیلانغرب"),"331"==t&&(cityN="استان کرمانشاه - شهر هرسین"),"687"==t&&(cityN="استان کهکیلویه و بویراحمد - شهر باشت"),("422"==t||"423"==t)&&(cityN="استان کهکیلویه و بویراحمد - شهر بویراحمد(یاسوج)"),"599"==t&&(cityN="استان کهکیلویه و بویراحمد - شهر بهمنی"),"600"==t&&(cityN="استان کهکیلویه و بویراحمد - شهر چاروسا"),"688"==t&&(cityN="استان کهکیلویه و بویراحمد - شهر دروهان"),("424"==t||"425"==t)&&(cityN="استان کهکیلویه و بویراحمد - شهر کهکیلویه(دهدشت)"),"426"==t&&(cityN="استان کهکیلویه و بویراحمد - شهر گچساران(دوگنبدان)"),"550"==t&&(cityN="استان کهکیلویه و بویراحمد - شهر لنده"),"697"==t&&(cityN="استان کهکیلویه و بویراحمد - شهر مارگون"),"384"==t&&(cityN="استان کردستان - شهر بانه"),("377"==t||"378"==t)&&(cityN="استان کردستان - شهر بیجار"),"558"==t&&(cityN="استان کردستان - شهر دهگلان"),"385"==t&&(cityN="استان کردستان - شهر دیواندره"),"646"==t&&(cityN="استان کردستان - شهر سروآباد"),("375"==t||"376"==t)&&(cityN="استان کردستان - شهر سقز"),("372"==t||"373"==t)&&(cityN="استان کردستان - شهر سنندج"),("379"==t||"380"==t)&&(cityN="استان کردستان - شهر قروه"),"383"==t&&(cityN="استان کردستان - شهر کامیاران"),"674"==t&&(cityN="استان کردستان - شهر کرانی"),("381"==t||"382"==t)&&(cityN="استان کردستان - شهر مریوان"),"676"==t&&(cityN="استان کردستان - شهر نمشیر"),"722"==t&&(cityN="استان کرمان - شهر ارزونیه"),"542"==t&&(cityN="استان کرمان - شهر انار"),("312"==t||"313"==t)&&(cityN="استان کرمان - شهر بافت"),"317"==t&&(cityN="استان کرمان - شهر بردسیر"),("310"==t||"311"==t)&&(cityN="استان کرمان - شهر بم"),("302"==t||"303"==t)&&(cityN="استان کرمان - شهر جیرفت"),"583"==t&&(cityN="استان کرمان - شهر رابر"),"321"==t&&(cityN="استان کرمان - شهر راور"),"382"==t&&(cityN="استان کرمان - شهر راین"),("304"==t||"305"==t)&&(cityN="استان کرمان - شهر رفسنجان"),"536"==t&&(cityN="استان کرمان - شهر رودبار کهنوج"),"605"==t&&(cityN="استان کرمان - شهر ریگان"),("308"==t||"309"==t)&&(cityN="استان کرمان - شهر زرند"),("306"==t||"307"==t)&&(cityN="استان کرمان - شهر سیرجان"),"319"==t&&(cityN="استان کرمان - شهر شهداد"),("313"==t||"314"==t)&&(cityN="استان کرمان - شهر شهربابک"),"606"==t&&(cityN="استان کرمان - شهر عنبرآباد"),"320"==t&&(cityN="استان کرمان - شهر فهرج"),"698"==t&&(cityN="استان کرمان - شهر قلعه گنج"),("298"==t||"299"==t)&&(cityN="استان کرمان - شهر کرمان"),"535"==t&&(cityN="استان کرمان - شهر کوهبنان"),("315"==t||"316"==t)&&(cityN="استان کرمان - شهر کهنوج"),"318"==t&&(cityN="استان کرمان - شهر گلباف"),"607"==t&&(cityN="استان کرمان - شهر ماهان"),"608"==t&&(cityN="استان کرمان - شهر منوجان"),"508"==t&&(cityN="استان قزوین - شهر آبیک"),"538"==t&&(cityN="استان قزوین - شهر آوج"),"728"==t&&(cityN="استان قزوین - شهر البرز"),"509"==t&&(cityN="استان قزوین - شهر بوئین زهرا"),("438"==t||"439"==t)&&(cityN="استان قزوین - شهر تاکستان"),"580"==t&&(cityN="استان قزوین - شهر رودبار الموت"),"590"==t&&(cityN="استان قزوین - شهر رودبار شهرستان"),"559"==t&&(cityN="استان قزوین - شهر ضیاءآباد"),"588"==t&&(cityN="استان قزوین - شهر طارم سفلی"),("431"==t||"432"==t)&&(cityN="استان قزوین - شهر قزوین"),("037"==t||"038"==t)&&(cityN="استان قم - شهر قم"),"702"==t&&(cityN="استان قم - شهر کهک"),("240"==t||"241"==t)&&(cityN="استان فارس - شهر آباده"),"670"==t&&(cityN="استان فارس - شهر آباده طشک"),"648"==t&&(cityN="استان فارس - شهر ارسنجان"),"252"==t&&(cityN="استان فارس - شهر استهبان"),"678"==t&&(cityN="استان فارس - شهر اشکنان"),"253"==t&&(cityN="استان فارس - شهر اقلید"),"649"==t&&(cityN="استان فارس - شهر اوز"),"513"==t&&(cityN="استان فارس - شهر بوانات"),"546"==t&&(cityN="استان فارس - شهر بیضا"),"671"==t&&(cityN="استان فارس - شهر جویم"),("246"==t||"247"==t)&&(cityN="استان فارس - شهر جهرم"),"654"==t&&(cityN="استان فارس - شهر حاجی آباد(زرین دشت)"),"548"==t&&(cityN="استان فارس - شهر خرامه"),"547"==t&&(cityN="استان فارس - شهر خشت و کمارج"),"655"==t&&(cityN="استان فارس - شهر خفر"),("248"==t||"249"==t)&&(cityN="استان فارس - شهر داراب"),"253"==t&&(cityN="استان فارس - شهر سپیدان"),"514"==t&&(cityN="استان فارس - شهر سروستان"),"665"==t&&(cityN="استان فارس - شهر سعادت آباد"),"673"==t&&(cityN="استان فارس - شهر شیبکوه"),("228"==t||"229"==t||"230"==t)&&(cityN="استان فارس - شهر شیراز"),"679"==t&&(cityN="استان فارس - شهر فراشبند"),("256"==t||"257"==t)&&(cityN="استان فارس - شهر فسا"),("244"==t||"245"==t)&&(cityN="استان فارس - شهر فیروزآباد"),"681"==t&&(cityN="استان فارس - شهر قنقری(خرم بید)"),"723"==t&&(cityN="استان فارس - شهر قیروکارزین"),("236"==t||"237"==t)&&(cityN="استان فارس - شهر کازرون"),"683"==t&&(cityN="استان فارس - شهر کوار"),"656"==t&&(cityN="استان فارس - شهر کراش"),("250"==t||"251"==t)&&(cityN="استان فارس - شهر لارستان"),"515"==t&&(cityN="استان فارس - شهر لامرد"),("242"==t||"243"==t)&&(cityN="استان فارس - شهر مرودشت"),("238"==t||"239"==t)&&(cityN="استان فارس - شهر ممسنی"),"657"==t&&(cityN="استان فارس - شهر مهر"),"255"==t&&(cityN="استان فارس - شهر نی ریز"),"684"==t&&(cityN="استان سمنان - شهر ایوانکی"),"700"==t&&(cityN="استان سمنان - شهر بسطام"),"642"==t&&(cityN="استان سمنان - شهر بیارجمند"),"457"==t&&(cityN="استان سمنان - شهر دامغان"),"456"==t&&(cityN="استان سمنان - شهر سمنان"),("458"==t||"459"==t)&&(cityN="استان سمنان - شهر شاهرود"),"460"==t&&(cityN="استان سمنان - شهر گرمسار"),"530"==t&&(cityN="استان سمنان - شهر مهدیشهر"),"520"==t&&(cityN="استان سمنان - شهر میامی"),("358"==t||"359"==t)&&(cityN="استان سیستان و بلوچستان - شهر ایرانشهر"),"682"==t&&(cityN="استان سیستان و بلوچستان - شهر بزمان"),"703"==t&&(cityN="استان سیستان و بلوچستان - شهر بمپور"),("364"==t||"365"==t)&&(cityN="استان سیستان و بلوچستان - شهر چابهار"),"371"==t&&(cityN="استان سیستان و بلوچستان - شهر خاش"),"701"==t&&(cityN="استان سیستان و بلوچستان - شهر دشتیاری"),"720"==t&&(cityN="استان سیستان و بلوچستان - شهر راسک"),("366"==t||"367"==t)&&(cityN="استان سیستان و بلوچستان - شهر زابل"),"704"==t&&(cityN="استان سیستان و بلوچستان - شهر زابلی"),("361"==t||"362"==t)&&(cityN="استان سیستان و بلوچستان - شهر زاهدان"),("369"==t||"370"==t)&&(cityN="استان سیستان و بلوچستان - شهر سراوان"),"635"==t&&(cityN="استان سیستان و بلوچستان - شهر سرباز"),"668"==t&&(cityN="استان سیستان و بلوچستان - شهر سیب و سوران"),"533"==t&&(cityN="استان سیستان و بلوچستان - شهر شهرکی و ناروئی(زهک)"),"705"==t&&(cityN="استان سیستان و بلوچستان - شهر شیب آب"),"699"==t&&(cityN="استان سیستان و بلوچستان - شهر فنوج"),"669"==t&&(cityN="استان سیستان و بلوچستان - شهر قصرقند"),"725"==t&&(cityN="استان سیستان و بلوچستان - شهر کنارک"),"597"==t&&(cityN="استان سیستان و بلوچستان - شهر لاشار(اسپکه)"),"611"==t&&(cityN="استان سیستان و بلوچستان - شهر میرجاوه"),"525"==t&&(cityN="استان سیستان و بلوچستان - شهر نیک شهر"),"181"==t&&(cityN="استان خوزستان - شهر آبادان"),"527"==t&&(cityN="استان خوزستان - شهر آغاجاری"),"585"==t&&(cityN="استان خوزستان - شهر اروندکنار"),"685"==t&&(cityN="استان خوزستان - شهر امیدیه"),"663"==t&&(cityN="استان خوزستان - شهر اندیکا"),("192"==t||"193"==t)&&(cityN="استان خوزستان - شهر اندیمشک"),("174"==t||"175"==t)&&(cityN="استان خوزستان - شهر اهواز"),("183"==t||"184"==t)&&(cityN="استان خوزستان - شهر ایذه"),"481"==t&&(cityN="استان خوزستان - شهر باغ ملک"),"706"==t&&(cityN="استان خوزستان - شهر بندر امام خمینی"),("194"==t||"195"==t)&&(cityN="استان خوزستان - شهر بندرماهشهر"),("185"==t||"186"==t)&&(cityN="استان خوزستان - شهر بهبهان"),"182"==t&&(cityN="استان خوزستان - شهر خرمشهر"),("199"==t||"200"==t)&&(cityN="استان خوزستان - شهر دزفول"),"198"==t&&(cityN="استان خوزستان - شهر دشت آزادگان"),"662"==t&&(cityN="استان خوزستان - شهر رامشیر"),("190"==t||"191"==t)&&(cityN="استان خوزستان - شهر رامهرمز"),"692"==t&&(cityN="استان خوزستان - شهر سردشت"),"189"==t&&(cityN="استان خوزستان - شهر شادگان"),"707"==t&&(cityN="استان خوزستان - شهر شاوور"),"526"==t&&(cityN="استان خوزستان - شهر شوش"),("187"==t||"188"==t)&&(cityN="استان خوزستان - شهر شوشتر"),"729"==t&&(cityN="استان خوزستان - شهر گتوند"),"730"==t&&(cityN="استان خوزستان - شهر لالی"),("196"==t||"197"==t)&&(cityN="استان خوزستان - شهر مسجدسلیمان"),"661"==t&&(cityN="استان خوزستان - شهر هندیجان"),"680"==t&&(cityN="استان خوزستان - شهر هویزه"),"643"==t&&(cityN="استان خراسان رضوی - شهر احمدآباد"),"562"==t&&(cityN="استان خراسان رضوی - شهر بجستان"),"572"==t&&(cityN="استان خراسان رضوی - شهر بردسکن"),"074"==t&&(cityN="استان خراسان رضوی - شهر تایباد"),"644"==t&&(cityN="استان خراسان رضوی - شهر تخت جلگه"),("072"==t||"073"==t)&&(cityN="استان خراسان رضوی - شهر تربت جام"),("069"==t||"070"==t)&&(cityN="استان خراسان رضوی - شهر تربت حیدریه"),"521"==t&&(cityN="استان خراسان رضوی - شهر جغتای"),"573"==t&&(cityN="استان خراسان رضوی - شهر جوین"),"522"==t&&(cityN="استان خراسان رضوی - شهر چناران"),"724"==t&&(cityN="استان خراسان رضوی - شهر خلیل آباد"),"076"==t&&(cityN="استان خراسان رضوی - شهر خواف"),"077"==t&&(cityN="استان خراسان رضوی - شهر درگز"),"650"==t&&(cityN="استان خراسان رضوی - شهر رشتخوار"),"574"==t&&(cityN="استان خراسان رضوی - شهر زبرخان"),("078"==t||"079"==t)&&(cityN="استان خراسان رضوی - شهر سبزوار"),"081"==t&&(cityN="استان خراسان رضوی - شهر سرخس"),"084"==t&&(cityN="استان خراسان رضوی - شهر فریمان"),"651"==t&&(cityN="استان خراسان رضوی - شهر فیض آباد"),("086"==t||"087"==t)&&(cityN="استان خراسان رضوی - شهر قوچان"),("089"==t||"090"==t)&&(cityN="استان خراسان رضوی - شهر کاشمر"),"553"==t&&(cityN="استان خراسان رضوی - شهر کلات"),"091"==t&&(cityN="استان خراسان رضوی - شهر گناباد"),("092"==t||"093"==t||"094"==t)&&(cityN="استان خراسان رضوی - شهر مشهد"),"097"==t&&(cityN="استان خراسان رضوی - شهر مشهد منطقه2"),"098"==t&&(cityN="استان خراسان رضوی - شهر مشهد منطقه3"),"096"==t&&(cityN="استان خراسان رضوی - شهر مشهد منطقه1"),("105"==t||"106"==t)&&(cityN="استان خراسان رضوی - شهر نیشابور"),"063"==t&&(cityN="استان خراسان شمالی - شهر اسفراین"),("067"==t||"068"==t)&&(cityN="استان خراسان شمالی - شهر بجنورد"),"075"==t&&(cityN="استان خراسان شمالی - شهر جاجرم"),"591"==t&&(cityN="استان خراسان شمالی - شهر رازوجرکلان"),"082"==t&&(cityN="استان خراسان شمالی - شهر شیروان"),"635"==t&&(cityN="استان خراسان شمالی - شهر فاروج"),"524"==t&&(cityN="استان خراسان شمالی - شهر مانه و سملقان"),"468"==t&&(cityN="استان چهارمحال و بختیاری - شهر اردل"),"465"==t&&(cityN="استان چهارمحال و بختیاری - شهر بروجن"),("461"==t||"462"==t)&&(cityN="استان چهارمحال و بختیاری - شهر شهرکرد"),"467"==t&&(cityN="استان چهارمحال و بختیاری - شهر فارسان"),"555"==t&&(cityN="استان چهارمحال و بختیاری - شهر کوهرنگ"),"633"==t&&(cityN="استان چهارمحال و بختیاری - شهر کیار"),"629"==t&&(cityN="استان چهارمحال و بختیاری - شهر گندمان"),"466"==t&&(cityN="استان چهارمحال و بختیاری - شهر لردگان"),"696"==t&&(cityN="استان چهارمحال و بختیاری - شهر میانکوه"),"721"==t&&(cityN="استان خراسان جنوبی - شهر بشرویه"),("064"==t||"065"==t)&&(cityN="استان خراسان جنوبی - شهر بیرجند"),"523"==t&&(cityN="استان خراسان جنوبی - شهر درمیان"),"652"==t&&(cityN="استان خراسان جنوبی - شهر زیرکوه"),"719"==t&&(cityN="استان خراسان جنوبی - شهر سرایان"),"716"==t&&(cityN="استان خراسان جنوبی - شهر سربیشه"),"085"==t&&(cityN="استان خراسان جنوبی - شهر فردوس"),"088"==t&&(cityN="استان خراسان جنوبی - شهر قائنات"),"563"==t&&(cityN="استان خراسان جنوبی - شهر نهبندان"),"529"==t&&(cityN="استان بوشهر - شهر بندر دیلم"),"353"==t&&(cityN="استان بوشهر - شهر بندر گناوه"),("349"==t||"350"==t)&&(cityN="استان بوشهر - شهر بوشهر"),"355"==t&&(cityN="استان بوشهر - شهر تنگستان"),"609"==t&&(cityN="استان بوشهر - شهر جم"),("351"==t||"352"==t)&&(cityN="استان بوشهر - شهر دشتستان"),"354"==t&&(cityN="استان بوشهر - شهر دشتی"),"732"==t&&(cityN="استان بوشهر - شهر دلوار"),"357"==t&&(cityN="استان بوشهر - شهر دیر"),"532"==t&&(cityN="استان بوشهر - شهر سعد آباد"),"610"==t&&(cityN="استان بوشهر - شهر شبانکاره"),"356"==t&&(cityN="استان بوشهر - شهر کنگان"),"556"==t&&(cityN="استان تهران - شهر اسلامشهر"),"658"==t&&(cityN="استان تهران - شهر پاکدشت"),("001"==t||"002"==t||"003"==t||"004"==t||"005"==t||"006"==t||"007"==t||"008"==t)&&(cityN="استان تهران - شهر تهران مرکزی"),"011"==t&&(cityN="استان تهران - شهر تهران جنوب"),"020"==t&&(cityN="استان تهران - شهر تهران شرق"),"025"==t&&(cityN="استان تهران - شهر تهرانشمال"),"015"==t&&(cityN="استان تهران - شهر تهران غرب"),"043"==t&&(cityN="استان تهران - شهر دماوند"),"666"==t&&(cityN="استان تهران - شهر رباط کریم"),"489"==t&&(cityN="استان تهران - شهر ساوجبلاغ"),("044"==t||"045"==t)&&(cityN="استان تهران - شهر شمیران"),("048"==t||"049"==t)&&(cityN="استان تهران - شهر شهرری"),("490"==t||"491"==t)&&(cityN="استان تهران - شهر شهریار"),"695"==t&&(cityN="استان تهران - شهر طالقان"),"659"==t&&(cityN="استان تهران - شهر فیروزکوه"),("031"==t||"032"==t)&&(cityN="استان تهران - شهر کرج"),"664"==t&&(cityN="استان تهران - شهر کهریزک"),"717"==t&&(cityN="استان تهران - شهر نظرآباد"),("041"==t||"042"==t)&&(cityN="استان تهران - شهر ورامین"),("471"==t||"472"==t)&&(cityN=" امور خارجه - امور خارجه"),"454"==t&&(cityN="استان ایلام - شهر آبدانان"),"581"==t&&(cityN="استان ایلام - شهر ارکوازی(ملکشاهی)"),("449"==t||"450"==t)&&(cityN="استان ایلام - شهر ایلام"),"616"==t&&(cityN="استان ایلام - شهر ایوان"),"534"==t&&(cityN="استان ایلام - شهر بدره"),"455"==t&&(cityN="استان ایلام - شهر دره شهر"),"451"==t&&(cityN="استان ایلام - شهر دهلران"),"726"==t&&(cityN="استان ایلام - شهر زرین آباد"),"634"==t&&(cityN="استان ایلام - شهر شیروان لومار"),"453"==t&&(cityN="استان ایلام - شهر شیروان و چرداول"),"727"==t&&(cityN="استان ایلام - شهر موسیان"),"452"==t&&(cityN="استان ایلام - شهر مهران"),("145"==t||"146"==t)&&(cityN="استان اردبیل - شهر اردبیل"),"731"==t&&(cityN="استان اردبیل - شهر ارشق"),"690"==t&&(cityN="استان اردبیل - شهر انگوت"),"601"==t&&(cityN="استان اردبیل - شهر بیله سوار"),"504"==t&&(cityN="استان اردبیل - شهر پارس آباد"),"163"==t&&(cityN="استان اردبیل - شهر خلخال"),"714"==t&&(cityN="استان اردبیل - شهر خورش رستم"),"715"==t&&(cityN="استان اردبیل - شهر سرعین"),"566"==t&&(cityN="استان اردبیل - شهر سنجبد(کوثر)"),("166"==t||"167"==t)&&(cityN="استان اردبیل - شهر مشکین شهر"),("161"==t||"162"==t)&&(cityN="استان اردبیل - شهر مغان"),"686"==t&&(cityN="استان اردبیل - شهر نمین"),"603"==t&&(cityN="استان اردبیل - شهر نیر"),"619"==t&&(cityN="استان اصفهان - شهر آران و بیدگل"),"118"==t&&(cityN="استان اصفهان - شهر اردستان"),("127"==t||"128"==t||"129"==t)&&(cityN="استان اصفهان - شهر اصفهان"),"620"==t&&(cityN="استان اصفهان - شهر باغ بهادران"),"621"==t&&(cityN="استان اصفهان - شهر بوئین و میاندشت"),"549"==t&&(cityN="استان اصفهان - شهر تیران و کرون"),"564"==t&&(cityN="استان اصفهان - شهر جرقویه"),"575"==t&&(cityN="استان اصفهان - شهر چادگان"),("113"==t||"114"==t)&&(cityN="استان اصفهان - شهر خمینی شهر"),"122"==t&&(cityN="استان اصفهان - شهر خوانسار"),"540"==t&&(cityN="استان اصفهان - شهر خور و بیابانک"),"660"==t&&(cityN="استان اصفهان - شهر دولت آباد"),"120"==t&&(cityN="استان اصفهان - شهر سمیرم"),"512"==t&&(cityN="استان اصفهان - شهر سمیرم سفلی (دهاقان)"),("510"==t||"511"==t)&&(cityN="استان اصفهان - شهر شاهین شهر"),"119"==t&&(cityN="استان اصفهان - شهر شهرضا"),"115"==t&&(cityN="استان اصفهان - شهر فریدن"),"112"==t&&(cityN="استان اصفهان - شهر فریدونشهر"),("110"==t||"111"==t)&&(cityN="استان اصفهان - شهر فلاورجان"),("125"==t||"126"==t)&&(cityN="استان اصفهان - شهر کاشان"),"565"==t&&(cityN="استان اصفهان - شهر کوهپایه"),"121"==t&&(cityN="استان اصفهان - شهر گلپایگان"),("116"==t||"117"==t)&&(cityN="استان اصفهان - شهر لنجان(زرینشهر)"),"541"==t&&(cityN="استان اصفهان - شهر مبارکه"),"622"==t&&(cityN="استان اصفهان - شهر میمه"),"124"==t&&(cityN="استان اصفهان - شهر نائین"),("108"==t||"109"==t)&&(cityN="استان اصفهان - شهر نجف آباد"),"123"==t&&(cityN="استان اصفهان - شهر نطنز"),("427"==t||"428"==t)&&(cityN="استان زنجان - شهر زنجان"),"507"==t&&(cityN="استان آذربایجان شرقی - شهر ملکان"),"158"==t&&(cityN="استان آذربایجان شرقی - شهر مرند"),("152"==t||"153"==t)&&(cityN="استان آذربایجان شرقی - شهر میانه"),"615"==t&&(cityN="استان قزوین - شهر ابهر و خرمدره"),cityN}function melli_code_function(t,i,y,N,e,a,l){if(document.getElementById("city_"+i).innerHTML="",""==t.value)return!1;if(t.value=t.value.replace("-","").replace("-",""),8==t.value.length&&(t.value="00"+t.value),9==t.value.length&&(t.value="0"+t.value),isNaN(t.value))return document.getElementById("city_"+i).innerHTML=y,!1;if(t.value.length>10||t.value.length<8)return document.getElementById("city_"+i).innerHTML=N,!1;var u=["0000000000","1111111111","2222222222","3333333333","4444444444","5555555555","6666666666","7777777777","8888888888","9999999999"],v=u.indexOf(t.value);return"-1"!=v?(document.getElementById("city_"+i).innerHTML=e,!1):(city=t.value.substring(0,3),c=parseInt(t.value.charAt(9)),n=10*parseInt(t.value.charAt(0))+9*parseInt(t.value.charAt(1))+8*parseInt(t.value.charAt(2))+7*parseInt(t.value.charAt(3))+6*parseInt(t.value.charAt(4))+5*parseInt(t.value.charAt(5))+4*parseInt(t.value.charAt(6))+3*parseInt(t.value.charAt(7))+2*parseInt(t.value.charAt(8)),r=n-11*parseInt(n/11),0==r&&r==c||1==r&&1==c||r>1&&c==11-r?(a&&10==t.value.length&&(t.value=t.value.substring(0,3)+"-"+t.value.substring(3,9)+"-"+t.value.substring(9,10)),l?(document.getElementById("city_"+i).innerHTML=cityName_by_melliCode_hannanstd(city),!0):void 0):(document.getElementById("city_"+i).innerHTML=e,!1))}
|
assets/js/wp-admin-datepicker.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
var hs=jQuery.noConflict();hs(document).ready(function(hs){function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={calendar:Date,closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};hs.extend(this._defaults,this.regional[""]);this.dpDiv=bindHover(hs('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.bind("mouseout",function(e){var n=hs(e.target).closest(t);if(!n.length){return}n.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(n){var r=hs(n.target).closest(t);if(hs.datepicker._isDisabledDatepicker(instActive.inline?e.parent()[0]:instActive.input[0])||!r.length){return}r.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");r.addClass("ui-state-hover");if(r.hasClass("ui-datepicker-prev")){r.addClass("ui-datepicker-prev-hover")}if(r.hasClass("ui-datepicker-next")){r.addClass("ui-datepicker-next-hover")}})}function extendRemove(e,t){hs.extend(e,t);for(var n in t){if(t[n]==null||t[n]==undefined){e[n]=t[n]}}return e}function isArray(e){return e&&(hs.browser.safari&&typeof e=="object"&&e.length||e.constructor&&e.constructor.toString().match(/\Array\(\)/))}function mod(e,t){return e-t*Math.floor(e/t)}function leap_gregorian(e){return e%4==0&&!(e%100==0&&e%400!=0)}function gregorian_to_jd(e,t,n){return GREGORIAN_EPOCH-1+365*(e-1)+Math.floor((e-1)/4)+ -Math.floor((e-1)/100)+Math.floor((e-1)/400)+Math.floor((367*t-362)/12+(t<=2?0:leap_gregorian(e)?-1:-2)+n)}function jd_to_gregorian(e){var t,n,r,i,s,o,u,a,f,l,c,h,p;t=Math.floor(e-.5)+.5;n=t-GREGORIAN_EPOCH;r=Math.floor(n/146097);i=mod(n,146097);s=Math.floor(i/36524);o=mod(i,36524);u=Math.floor(o/1461);a=mod(o,1461);f=Math.floor(a/365);c=r*400+s*100+u*4+f;if(!(s==4||f==4)){c++}h=t-gregorian_to_jd(c,1,1);p=t<gregorian_to_jd(c,3,1)?0:leap_gregorian(c)?1:2;month=Math.floor(((h+p)*12+373)/367);day=t-gregorian_to_jd(c,month,1)+1;return new Array(c,month,day)}function leap_islamic(e){return(e*11+14)%30<11}function islamic_to_jd(e,t,n){return n+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+ISLAMIC_EPOCH-1}function jd_to_islamic(e){var t,n,r;e=Math.floor(e)+.5;t=Math.floor((30*(e-ISLAMIC_EPOCH)+10646)/10631);n=Math.min(12,Math.ceil((e-(29+islamic_to_jd(t,1,1)))/29.5)+1);r=e-islamic_to_jd(t,n,1)+1;return new Array(t,n,r)}function leap_persian(e){return((e-(e>0?474:473))%2820+474+38)*682%2816<682}function persian_to_jd(e,t,n){var r,i;r=e-(e>=0?474:473);i=474+mod(r,2820);return n+(t<=7?(t-1)*31:(t-1)*30+6)+Math.floor((i*682-110)/2816)+(i-1)*365+Math.floor(r/2820)*1029983+(PERSIAN_EPOCH-1)}function jd_to_persian(e){var t,n,r,i,s,o,u,a,f,l;e=Math.floor(e)+.5;i=e-persian_to_jd(475,1,1);s=Math.floor(i/1029983);o=mod(i,1029983);if(o==1029982){u=2820}else{a=Math.floor(o/366);f=mod(o,366);u=Math.floor((2134*a+2816*f+2815)/1028522)+a+1}t=u+2820*s+474;if(t<=0){t--}l=e-persian_to_jd(t,1,1)+1;n=l<=186?Math.ceil(l/31):Math.ceil((l-6)/30);r=e-persian_to_jd(t,n,1)+1;return new Array(t,n,r)}function JalaliDate(e,t,n){function o(e){var t=0;if(e[1]<0){t=leap_persian(e[0]-1)?30:29;e[1]++}var n=jd_to_gregorian(persian_to_jd(e[0],e[1]+1,e[2])-t);n[1]--;return n}function u(e){var t=jd_to_persian(gregorian_to_jd(e[0],e[1]+1,e[2]));t[1]--;return t}function a(e){if(e&&e.getGregorianDate){e=e.getGregorianDate()}r=new Date(e);r.setHours(r.getHours()>12?r.getHours()+2:0);if(!r||r=="Invalid Date"||isNaN(r||!r.getDate())){r=new Date}i=u([r.getFullYear(),r.getMonth(),r.getDate()]);return this}var r;var i;if(!isNaN(parseInt(e))&&!isNaN(parseInt(t))&&!isNaN(parseInt(n))){var s=o([parseInt(e,10),parseInt(t,10),parseInt(n,10)]);a(new Date(s[0],s[1],s[2]))}else{a(e)}this.getGregorianDate=function(){return r};this.setFullDate=a;this.setMonth=function(e){i[1]=e;var t=o(i);r=new Date(t[0],t[1],t[2]);i=u([t[0],t[1],t[2]])};this.setDate=function(e){i[2]=e;var t=o(i);r=new Date(t[0],t[1],t[2]);i=u([t[0],t[1],t[2]])};this.getFullYear=function(){return i[0]};this.getMonth=function(){return i[1]};this.getDate=function(){return i[2]};this.toString=function(){return i.join(",").toString()};this.getDay=function(){return r.getDay()};this.getHours=function(){return r.getHours()};this.getMinutes=function(){return r.getMinutes()};this.getSeconds=function(){return r.getSeconds()};this.getTime=function(){return r.getTime()};this.getTimeZoneOffset=function(){return r.getTimeZoneOffset()};this.getYear=function(){return i[0]%100};this.setHours=function(e){r.setHours(e)};this.setMinutes=function(e){r.setMinutes(e)};this.setSeconds=function(e){r.setSeconds(e)};this.setMilliseconds=function(e){r.setMilliseconds(e)}}hs.extend(hs.ui,{datepicker:{version:"1.8.14"}});var PROP_NAME="datepicker";var dpuuid=(new Date).getTime();var instActive;hs.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){if(this.debug){console.log.apply("",arguments)}},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){extendRemove(this._defaults,e||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=nodeName=="div"||nodeName=="span";if(!target.id){this.uuid+=1;target.id="dp"+this.uuid}var inst=this._newInst(hs(target),inline);var regional=hs.extend({},settings&&this.regional[settings.regional]||{});inst.settings=hs.extend(regional,settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(e,t){var n=e[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\hs1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:!t?this.dpDiv:bindHover(hs('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(e,t){var n=hs(e);t.append=hs([]);t.trigger=hs([]);if(n.hasClass(this.markerClassName)){return}this._attachments(n,t);n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,n,r){t.settings[n]=r}).bind("getData.datepicker",function(e,n){return this._get(t,n)});this._autoSize(t);hs.data(e,PROP_NAME,t)},_attachments:function(e,t){var n=this._get(t,"appendText");var r=false;if(t.append){t.append.remove()}if(n){t.append=hs('<span class="'+this._appendClass+'">'+n+"</span>");e[r?"before":"after"](t.append)}e.unbind("focus",this._showDatepicker);if(t.trigger){t.trigger.remove()}var i=this._get(t,"showOn");if(i=="focus"||i=="both"){e.focus(this._showDatepicker)}if(i=="button"||i=="both"){var s=this._get(t,"buttonText");var o=this._get(t,"buttonImage");t.trigger=hs(this._get(t,"buttonImageOnly")?hs("<img/>").addClass(this._triggerClass).attr({src:o,alt:s,title:s}):hs('<button type="button"></button>').addClass(this._triggerClass).html(o==""?s:hs("<img/>").attr({src:o,alt:s,title:s})));e[r?"before":"after"](t.trigger);t.trigger.click(function(){if(hs.datepicker._datepickerShowing&&hs.datepicker._lastInput==e[0]){hs.datepicker._hideDatepicker()}else{hs.datepicker._showDatepicker(e[0])}return false})}},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t=new Date(2009,12-1,20);var n=this._get(e,"dateFormat");if(n.match(/[DM]/)){var r=function(e){var t=0;var n=0;for(var r=0;r<e.length;r++){if(e[r].length>t){t=e[r].length;n=r}}return n};t.setMonth(r(this._get(e,n.match(/MM/)?"monthNames":"monthNamesShort")));t.setDate(r(this._get(e,n.match(/DD/)?"dayNames":"dayNamesShort"))+20-t.getDay())}e.input.attr("size",this._formatDate(e,t).length)}},_inlineDatepicker:function(e,t){var n=hs(e);if(n.hasClass(this.markerClassName)){return}n.addClass(this.markerClassName).append(t.dpDiv).bind("setData.datepicker",function(e,n,r){t.settings[n]=r}).bind("getData.datepicker",function(e,n){return this._get(t,n)});hs.data(e,PROP_NAME,t);this._setDate(t,this._getDefaultDate(t),true);this._updateDatepicker(t);this._updateAlternate(t);t.dpDiv.show()},_dialogDatepicker:function(e,t,n,r,i){var s=this._dialogInst;if(!s){this.uuid+=1;var o="dp"+this.uuid;this._dialogInput=hs('<input type="text" id="'+o+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);hs("body").append(this._dialogInput);s=this._dialogInst=this._newInst(this._dialogInput,false);s.settings={};hs.data(this._dialogInput[0],PROP_NAME,s)}extendRemove(s.settings,r||{});t=t&&t.constructor==Date?this._formatDate(s,t):t;this._dialogInput.val(t);this._pos=i?i.length?i:[i.pageX,i.pageY]:null;if(!this._pos){var u=document.documentElement.clientWidth;var a=document.documentElement.clientHeight;var f=document.documentElement.scrollLeft||document.body.scrollLeft;var l=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[u/2-100+f,a/2-150+l]}this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");s.settings.onSelect=n;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if(hs.blockUI){hs.blockUI(this.dpDiv)}hs.data(this._dialogInput[0],PROP_NAME,s);return this},_destroyDatepicker:function(e){var t=hs(e);var n=hs.data(e,PROP_NAME);if(!t.hasClass(this.markerClassName)){return}var r=e.nodeName.toLowerCase();hs.removeData(e,PROP_NAME);if(r=="input"){n.append.remove();n.trigger.remove();t.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(r=="div"||r=="span"){t.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(e){var t=hs(e);var n=hs.data(e,PROP_NAME);if(!t.hasClass(this.markerClassName)){return}var r=e.nodeName.toLowerCase();if(r=="input"){e.disabled=false;n.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(r=="div"||r=="span"){var i=t.children("."+this._inlineClass);i.children().removeClass("ui-state-disabled");i.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}}this._disabledInputs=hs.map(this._disabledInputs,function(t){return t==e?null:t})},_disableDatepicker:function(e){var t=hs(e);var n=hs.data(e,PROP_NAME);if(!t.hasClass(this.markerClassName)){return}var r=e.nodeName.toLowerCase();if(r=="input"){e.disabled=true;n.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(r=="div"||r=="span"){var i=t.children("."+this._inlineClass);i.children().addClass("ui-state-disabled");i.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}}this._disabledInputs=hs.map(this._disabledInputs,function(t){return t==e?null:t});this._disabledInputs[this._disabledInputs.length]=e},_isDisabledDatepicker:function(e){if(!e){return false}for(var t=0;t<this._disabledInputs.length;t++){if(this._disabledInputs[t]==e){return true}}return false},_getInst:function(e){try{return hs.data(e,PROP_NAME)}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,n){var r=this._getInst(e);if(arguments.length==2&&typeof t=="string"){return t=="defaults"?hs.extend({},hs.datepicker._defaults):r?t=="all"?hs.extend({},r.settings):this._get(r,t):null}var i=t||{};if(typeof t=="string"){i={};i[t]=n}if(r){if(this._curInst==r){this._hideDatepicker()}var s=this._getDateDatepicker(e,true);var o=this._getMinMaxDate(r,"min");var u=this._getMinMaxDate(r,"max");extendRemove(r.settings,i);if(o!==null&&i.dateFormat!==undefined&&i.minDate===undefined){r.settings.minDate=this._formatDate(r,o)}if(u!==null&&i.dateFormat!==undefined&&i.maxDate===undefined){r.settings.maxDate=this._formatDate(r,u)}this._attachments(hs(e),r);this._autoSize(r);this._setDate(r,s);this._updateAlternate(r);this._updateDatepicker(r)}},_changeDatepicker:function(e,t,n){this._optionDatepicker(e,t,n)},_refreshDatepicker:function(e){var t=this._getInst(e);if(t){this._updateDatepicker(t)}},_setDateDatepicker:function(e,t){var n=this._getInst(e);if(n){this._setDate(n,t);this._updateDatepicker(n);this._updateAlternate(n)}},_getDateDatepicker:function(e,t){var n=this._getInst(e);if(n&&!n.inline){this._setDateFromField(n,t)}return n?this._getDate(n):null},_doKeyDown:function(e){var t=hs.datepicker._getInst(e.target);var n=true;var r=t.dpDiv.is(".ui-datepicker-rtl");t._keyEvent=true;if(hs.datepicker._datepickerShowing){switch(e.keyCode){case 9:hs.datepicker._hideDatepicker();n=false;break;case 13:var i=hs("td."+hs.datepicker._dayOverClass+":not(."+hs.datepicker._currentClass+")",t.dpDiv);if(i[0]){hs.datepicker._selectDay(e.target,t.selectedMonth,t.selectedYear,i[0])}else{hs.datepicker._hideDatepicker()}return false;break;case 27:hs.datepicker._hideDatepicker();break;case 33:hs.datepicker._adjustDate(e.target,e.ctrlKey?-hs.datepicker._get(t,"stepBigMonths"):-hs.datepicker._get(t,"stepMonths"),"M");break;case 34:hs.datepicker._adjustDate(e.target,e.ctrlKey?+hs.datepicker._get(t,"stepBigMonths"):+hs.datepicker._get(t,"stepMonths"),"M");break;case 35:if(e.ctrlKey||e.metaKey){hs.datepicker._clearDate(e.target)}n=e.ctrlKey||e.metaKey;break;case 36:if(e.ctrlKey||e.metaKey){hs.datepicker._gotoToday(e.target)}n=e.ctrlKey||e.metaKey;break;case 37:if(e.ctrlKey||e.metaKey){hs.datepicker._adjustDate(e.target,r?+1:-1,"D")}n=e.ctrlKey||e.metaKey;if(e.originalEvent.altKey){hs.datepicker._adjustDate(e.target,e.ctrlKey?-hs.datepicker._get(t,"stepBigMonths"):-hs.datepicker._get(t,"stepMonths"),"M")}break;case 38:if(e.ctrlKey||e.metaKey){hs.datepicker._adjustDate(e.target,-7,"D")}n=e.ctrlKey||e.metaKey;break;case 39:if(e.ctrlKey||e.metaKey){hs.datepicker._adjustDate(e.target,r?-1:+1,"D")}n=e.ctrlKey||e.metaKey;if(e.originalEvent.altKey){hs.datepicker._adjustDate(e.target,e.ctrlKey?+hs.datepicker._get(t,"stepBigMonths"):+hs.datepicker._get(t,"stepMonths"),"M")}break;case 40:if(e.ctrlKey||e.metaKey){hs.datepicker._adjustDate(e.target,+7,"D")}n=e.ctrlKey||e.metaKey;break;default:n=false}}else{if(e.keyCode==36&&e.ctrlKey){hs.datepicker._showDatepicker(this)}else{n=false}}if(n){e.preventDefault();e.stopPropagation()}},_doKeyPress:function(e){var t=hs.datepicker._getInst(e.target);if(hs.datepicker._get(t,"constrainInput")){var n=hs.datepicker._possibleChars(hs.datepicker._get(t,"dateFormat"));var r=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||e.metaKey||r<" "||!n||n.indexOf(r)>-1}},_doKeyUp:function(e){var t=hs.datepicker._getInst(e.target);if(t.input.val()!=t.lastVal){try{var n=hs.datepicker.parseDate(hs.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,hs.datepicker._getFormatConfig(t));if(n){hs.datepicker._setDateFromField(t);hs.datepicker._updateAlternate(t);hs.datepicker._updateDatepicker(t)}}catch(e){hs.datepicker.log(e)}}return true},_showDatepicker:function(e){e=e.target||e;if(e.nodeName.toLowerCase()!="input"){e=hs("input",e.parentNode)[0]}if(hs.datepicker._isDisabledDatepicker(e)||hs.datepicker._lastInput==e){return}var t=hs.datepicker._getInst(e);if(hs.datepicker._curInst&&hs.datepicker._curInst!=t){if(hs.datepicker._datepickerShowing){hs.datepicker._triggerOnClose(hs.datepicker._curInst)}hs.datepicker._curInst.dpDiv.stop(true,true)}var n=hs.datepicker._get(t,"beforeShow");extendRemove(t.settings,n?n.apply(e,[e,t]):{});t.lastVal=null;hs.datepicker._lastInput=e;hs.datepicker._setDateFromField(t);if(hs.datepicker._inDialog){e.value=""}if(!hs.datepicker._pos){hs.datepicker._pos=hs.datepicker._findPos(e);hs.datepicker._pos[1]+=e.offsetHeight}var r=false;hs(e).parents().each(function(){r|=hs(this).css("position")=="fixed";return!r});if(r&&hs.browser.opera){hs.datepicker._pos[0]-=document.documentElement.scrollLeft;hs.datepicker._pos[1]-=document.documentElement.scrollTop}var i={left:hs.datepicker._pos[0],top:hs.datepicker._pos[1]};hs.datepicker._pos=null;t.dpDiv.empty();t.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});hs.datepicker._updateDatepicker(t);i=hs.datepicker._checkOffset(t,i,r);t.dpDiv.css({position:hs.datepicker._inDialog&&hs.blockUI?"static":r?"fixed":"absolute",display:"none",left:i.left+"px",top:i.top+"px"});if(!t.inline){var s=hs.datepicker._get(t,"showAnim");var o=hs.datepicker._get(t,"duration");var u=function(){var e=t.dpDiv.find("iframe.ui-datepicker-cover");if(!!e.length){var n=hs.datepicker._getBorders(t.dpDiv);e.css({left:-n[0],top:-n[1],width:t.dpDiv.outerWidth(),height:t.dpDiv.outerHeight()})}};t.dpDiv.zIndex(hs(e).zIndex()+1);hs.datepicker._datepickerShowing=true;if(hs.effects&&hs.effects[s]){t.dpDiv.show(s,hs.datepicker._get(t,"showOptions"),o,u)}else{t.dpDiv[s||"show"](s?o:null,u)}if(!s||!o){u()}if(t.input.is(":visible")&&!t.input.is(":disabled")){t.input.focus()}hs.datepicker._curInst=t}},_updateDatepicker:function(e){var t=this;t.maxRows=4;var n=hs.datepicker._getBorders(e.dpDiv);instActive=e;e.dpDiv.empty().append(this._generateHTML(e));var r=e.dpDiv.find("iframe.ui-datepicker-cover");if(!!r.length){r.css({left:-n[0],top:-n[1],width:e.dpDiv.outerWidth(),height:e.dpDiv.outerHeight()})}e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i=this._getNumberOfMonths(e);var s=i[1];var o=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");if(s>1){e.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",o*s+"em")}e.dpDiv[(i[0]!=1||i[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(e==hs.datepicker._curInst&&hs.datepicker._datepickerShowing&&e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&e.input[0]!=document.activeElement){e.input.focus()}if(e.yearshtml){var u=e.yearshtml;setTimeout(function(){if(u===e.yearshtml&&e.yearshtml){e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml)}u=e.yearshtml=null},0)}},_getBorders:function(e){var t=function(e){return{thin:1,medium:2,thick:3}[e]||e};return[parseFloat(t(e.css("border-left-width"))),parseFloat(t(e.css("border-top-width")))]},_checkOffset:function(e,t,n){var r=e.dpDiv.outerWidth();var i=e.dpDiv.outerHeight();var s=e.input?e.input.outerWidth():0;var o=e.input?e.input.outerHeight():0;var u=document.documentElement.clientWidth+hs(document).scrollLeft();var a=document.documentElement.clientHeight+hs(document).scrollTop();t.left-=this._get(e,"isRTL")?r-s:0;t.left-=n&&t.left==e.input.offset().left?hs(document).scrollLeft():0;t.top-=n&&t.top==e.input.offset().top+o?hs(document).scrollTop():0;t.left-=Math.min(t.left,t.left+r>u&&u>r?Math.abs(t.left+r-u):0);t.top-=Math.min(t.top,t.top+i>a&&a>i?Math.abs(i+o):0);return t},_findPos:function(e){var t=this._getInst(e);var n=this._get(t,"isRTL");while(e&&(e.type=="hidden"||e.nodeType!=1||hs.expr.filters.hidden(e))){e=e[n?"previousSibling":"nextSibling"]}var r=hs(e).offset();return[r.left,r.top]},_triggerOnClose:function(e){var t=this._get(e,"onClose");if(t){t.apply(e.input?e.input[0]:null,[e.input?e.input.val():"",e])}},_hideDatepicker:function(e){var t=this._curInst;if(!t||e&&t!=hs.data(e,PROP_NAME)){return}if(this._datepickerShowing){var n=this._get(t,"showAnim");var r=this._get(t,"duration");var i=function(){hs.datepicker._tidyDialog(t);this._curInst=null};if(hs.effects&&hs.effects[n]){t.dpDiv.hide(n,hs.datepicker._get(t,"showOptions"),r,i)}else{t.dpDiv[n=="slideDown"?"slideUp":n=="fadeIn"?"fadeOut":"hide"](n?r:null,i)}if(!n){i()}hs.datepicker._triggerOnClose(t);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(hs.blockUI){hs.unblockUI();hs("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(!hs.datepicker._curInst){return}var t=hs(e.target);if(t[0].id!=hs.datepicker._mainDivId&&t.parents("#"+hs.datepicker._mainDivId).length==0&&!t.hasClass(hs.datepicker.markerClassName)&&!t.hasClass(hs.datepicker._triggerClass)&&hs.datepicker._datepickerShowing&&!(hs.datepicker._inDialog&&hs.blockUI)){hs.datepicker._hideDatepicker()}},_adjustDate:function(e,t,n){var r=hs(e);var i=this._getInst(r[0]);if(this._isDisabledDatepicker(r[0])){return}this._adjustInstDate(i,t+(n=="M"?this._get(i,"showCurrentAtPos"):0),n);this._updateDatepicker(i)},_gotoToday:function(e){var t=hs(e);var n=this._getInst(t[0]);if(this._get(n,"gotoCurrent")&&n.currentDay){n.selectedDay=n.currentDay;n.drawMonth=n.selectedMonth=n.currentMonth;n.drawYear=n.selectedYear=n.currentYear}else{var r=new this.CDate;n.selectedDay=r.getDate();n.drawMonth=n.selectedMonth=r.getMonth();n.drawYear=n.selectedYear=r.getFullYear()}this._notifyChange(n);this._adjustDate(t)},_selectMonthYear:function(e,t,n){var r=hs(e);var i=this._getInst(r[0]);i._selectingMonthYear=false;i["selected"+(n=="M"?"Month":"Year")]=i["draw"+(n=="M"?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10);this._notifyChange(i);this._adjustDate(r)},_clickMonthYear:function(e){var t=hs(e);var n=this._getInst(t[0]);if(n.input&&n._selectingMonthYear){setTimeout(function(){n.input.focus()},0)}n._selectingMonthYear=!n._selectingMonthYear},_selectDay:function(e,t,n,r){var i=hs(e);if(hs(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(i[0])){return}var s=this._getInst(i[0]);s.selectedDay=s.currentDay=hs("a",r).html();s.selectedMonth=s.currentMonth=t;s.selectedYear=s.currentYear=n;this._selectDate(e,this._formatDate(s,s.currentDay,s.currentMonth,s.currentYear))},_clearDate:function(e){var t=hs(e);var n=this._getInst(t[0]);this._selectDate(t,"")},_selectDate:function(e,t){var n=hs(e);var r=this._getInst(n[0]);t=t!=null?t:this._formatDate(altFormat,date,this._getFormatConfig(r));if(r.input){r.input.val(t)}this._updateAlternate(r);var i=function(e,t){var n=new JalaliDate(t.selectedYear,t.selectedMonth,t.selectedDay);var r=n.getGregorianDate();var i=r.getMonth()+1;var s=r.getDate()<10?"0"+r.getDate():r.getDate();var o=r.getMonth()<9?"0"+i:i;hs(this).val(r.getFullYear()+"-"+o+"-"+s)};if(i){i.apply(r.input?r.input[0]:null,[t,r])}else{if(r.input){r.input.trigger("change")}}if(r.inline){this._updateDatepicker(r)}else{this._hideDatepicker();this._lastInput=r.input[0];if(typeof r.input[0]!="object"){r.input.focus()}this._lastInput=null}},_updateAlternate:function(e){var t=this._get(e,"altField");if(t){var n=this._get(e,"altFormat")||this._get(e,"dateFormat");var r=this._getDate(e);var i=this.formatDate(n,r,this._getFormatConfig(e));hs(t).each(function(){hs(this).val(i)})}},noWeekends:function(e){var t=e.getDay();return[t>0&&t<6,""]},iso8601Week:function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();t.setMonth(0);t.setDate(1);return Math.floor(Math.round((n-t)/864e5)/7)+1},parseDate:function(e,t,n){if(e==null||t==null){throw"Invalid arguments"}t=typeof t=="object"?t.toString():t+"";if(t==""){return null}var r=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff;r=typeof r!="string"?r:(new this.CDate).getFullYear()%100+parseInt(r,10);var i=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort;var s=(n?n.dayNames:null)||this._defaults.dayNames;var o=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort;var u=(n?n.monthNames:null)||this._defaults.monthNames;var a=-1;var f=-1;var l=-1;var c=-1;var h=false;var p=function(t){var n=y+1<e.length&&e.charAt(y+1)==t;if(n){y++}return n};var d=function(e){var n=p(e);var r=e=="@"?14:e=="!"?20:e=="y"&&n?4:e=="o"?3:2;var i=new RegExp("^\\d{1,"+r+"}");var s=t.substring(g).match(i);if(!s){throw"Missing number at position "+g}g+=s[0].length;return parseInt(s[0],10)};var v=function(e,n,r){var i=hs.map(p(e)?r:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});var s=-1;hs.each(i,function(e,n){var r=n[1];if(t.substr(g,r.length).toLowerCase()==r.toLowerCase()){s=n[0];g+=r.length;return false}});if(s!=-1){return s+1}else{throw"Unknown name at position "+g}};var m=function(){if(t.charAt(g)!=e.charAt(y)){throw"Unexpected literal at position "+g}g++};var g=0;for(var y=0;y<e.length;y++){if(h){if(e.charAt(y)=="'"&&!p("'")){h=false}else{m()}}else{switch(e.charAt(y)){case"d":l=d("d");break;case"D":v("D",i,s);break;case"o":c=d("o");break;case"m":f=d("m");break;case"M":f=v("M",o,u);break;case"y":a=d("y");break;case"@":var b=new this.CDate(d("@"));a=b.getFullYear();f=b.getMonth()+1;l=b.getDate();break;case"!":var b=new Date((d("!")-this._ticksTo1970)/1e4);a=b.getFullYear();f=b.getMonth()+1;l=b.getDate();break;case"'":if(p("'")){m()}else{h=true}break;default:m()}}}if(g<t.length){throw"Extra/unparsed characters found in date: "+t.substring(g)}if(a==-1){a=(new this.CDate).getFullYear()}else{if(a<100){a+=(new this.CDate).getFullYear()-(new this.CDate).getFullYear()%100+(a<=r?0:-100)}}if(c>-1){f=1;l=c;do{var w=this._getDaysInMonth(a,f-1);if(l<=w){break}f++;l-=w}while(true)}var b=this._daylightSavingAdjust(new this.CDate(a,f-1,l));if(b.getFullYear()!=a||b.getMonth()+1!=f||b.getDate()!=l){throw"Invalid date"}return b},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*1e7,formatDate:function(e,t,n){if(!t){return""}var r=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort;var i=(n?n.dayNames:null)||this._defaults.dayNames;var s=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort;var o=(n?n.monthNames:null)||this._defaults.monthNames;var u=function(t){var n=h+1<e.length&&e.charAt(h+1)==t;if(n){h++}return n};var a=function(e,t,n){var r=""+t;if(u(e)){while(r.length<n){r="0"+r}}return r};var f=function(e,t,n,r){return u(e)?r[t]:n[t]};var l="";var c=false;if(t){for(var h=0;h<e.length;h++){if(c){if(e.charAt(h)=="'"&&!u("'")){c=false}else{l+=e.charAt(h)}}else{switch(e.charAt(h)){case"d":l+=a("d",t.getDate(),2);break;case"D":l+=f("D",t.getDay(),r,i);break;case"o":l+=a("o",Math.round(((new this.CDate(t.getFullYear(),t.getMonth(),t.getDate())).getTime()-(new this.CDate(t.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":l+=a("m",t.getMonth()+1,2);break;case"M":l+=f("M",t.getMonth(),s,o);break;case"y":l+=u("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":l+=t.getTime();break;case"!":l+=t.getTime()*1e4+this._ticksTo1970;break;case"'":if(u("'")){l+="'"}else{c=true}break;default:l+=e.charAt(h)}}}}return l},_possibleChars:function(e){var t="";var n=false;var r=function(t){var n=i+1<e.length&&e.charAt(i+1)==t;if(n){i++}return n};for(var i=0;i<e.length;i++){if(n){if(e.charAt(i)=="'"&&!r("'")){n=false}else{t+=e.charAt(i)}}else{switch(e.charAt(i)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":if(r("'")){t+="'"}else{n=true}break;default:t+=e.charAt(i)}}}return t},_get:function(e,t){return e.settings[t]!==undefined?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()==e.lastVal){return}var n=this._get(e,"dateFormat");var r=e.lastVal=e.input?e.input.val():null;var i,s;i=s=this._getDefaultDate(e);var o=this._getFormatConfig(e);try{i=this.parseDate(n,r,o)||s}catch(u){this.log(u);r=t?"":r}e.selectedDay=i.getDate();e.drawMonth=e.selectedMonth=i.getMonth();e.drawYear=e.selectedYear=i.getFullYear();e.currentDay=r?i.getDate():0;e.currentMonth=r?i.getMonth():0;e.currentYear=r?i.getFullYear():0;this._adjustInstDate(e)},_getDefaultDate:function(e){this.CDate=this._get(e,"calendar");return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new this.CDate))},_determineDate:function(e,t,n){var r=this.CDate;var i=function(e){var t=new r;t.setDate(t.getDate()+e);return t};var s=function(t){try{return hs.datepicker.parseDate(hs.datepicker._get(e,"dateFormat"),t,hs.datepicker._getFormatConfig(e))}catch(n){}var i=(t.toLowerCase().match(/^c/)?hs.datepicker._getDate(e):null)||new r;var s=i.getFullYear();var o=i.getMonth();var u=i.getDate();var a=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var f=a.exec(t);while(f){switch(f[2]||"d"){case"d":case"D":u+=parseInt(f[1],10);break;case"w":case"W":u+=parseInt(f[1],10)*7;break;case"m":case"M":o+=parseInt(f[1],10);u=Math.min(u,hs.datepicker._getDaysInMonth(s,o));break;case"y":case"Y":s+=parseInt(f[1],10);u=Math.min(u,hs.datepicker._getDaysInMonth(s,o));break}f=a.exec(t)}return new r(s,o,u)};var o=t==null||t===""?n:typeof t=="string"?s(t):typeof t=="number"?isNaN(t)?n:i(t):new r(t.getTime());o=o&&o.toString()=="Invalid Date"?n:o;if(o){o.setHours(0);o.setMinutes(0);o.setSeconds(0);o.setMilliseconds(0)}return this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(e){if(!e){return null}e.setHours(e.getHours()>12?e.getHours()+2:0);return e},_setDate:function(e,t,n){var r=!t;var i=e.selectedMonth;var s=e.selectedYear;this.CDate=this._get(e,"calendar");var o=this._restrictMinMax(e,this._determineDate(e,t,new this.CDate));e.selectedDay=e.currentDay=o.getDate();e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth();e.drawYear=e.selectedYear=e.currentYear=o.getFullYear();if((i!=e.selectedMonth||s!=e.selectedYear)&&!n){this._notifyChange(e)}this._adjustInstDate(e);if(e.input){e.input.val(r?"":this._formatDate(e))}},_getDate:function(e){this.CDate=this._get(e,"calendar");var t=!e.currentYear||e.input&&e.input.val()==""?null:this._daylightSavingAdjust(new this.CDate(e.currentYear,e.currentMonth,e.currentDay));return t},_generateHTML:function(e){var t=new this.CDate;t=this._daylightSavingAdjust(new this.CDate(t.getFullYear(),t.getMonth(),t.getDate()));var n=this._get(e,"isRTL");var r=this._get(e,"showButtonPanel");var i=this._get(e,"hideIfNoPrevNext");var s=this._get(e,"navigationAsDateFormat");var o=this._getNumberOfMonths(e);var u=this._get(e,"showCurrentAtPos");var a=this._get(e,"stepMonths");var f=o[0]!=1||o[1]!=1;var l=this._daylightSavingAdjust(!e.currentDay?new Date(9999,9,9):new this.CDate(e.currentYear,e.currentMonth,e.currentDay));var c=this._getMinMaxDate(e,"min");var h=this._getMinMaxDate(e,"max");var p=e.drawMonth-u;var d=e.drawYear;if(p<0){p+=12;d--}if(h){var v=this._daylightSavingAdjust(new this.CDate(h.getFullYear(),h.getMonth()-o[0]*o[1]+1,h.getDate()));v=c&&this._compareDate(v,"<",c)?c:v;while(this._daylightSavingAdjust(new this.CDate(d,p,1))>v){p--;if(p<0){p=11;d--}}}e.drawMonth=p;e.drawYear=d;var m=this._get(e,"prevText");m=!s?m:this.formatDate(m,this._daylightSavingAdjust(new this.CDate(d,p-a,1)),this._getFormatConfig(e));var g=this._canAdjustMonth(e,-1,d,p)?'<a style="direction:ltr" class="ui-datepicker-prev ui-corner-all" onclick="DP_hs_'+dpuuid+".datepicker._adjustDate('#"+e.id+"', -"+a+", 'M');\" title=\""+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+m+"</span></a>":i?"":'<a style="direction:ltr" class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+m+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"e":"w")+'">'+m+"</span></a>";var y=this._get(e,"nextText");y=!s?y:this.formatDate(y,this._daylightSavingAdjust(new this.CDate(d,p+a,1)),this._getFormatConfig(e));var b=this._canAdjustMonth(e,+1,d,p)?'<a style="direction:ltr" class="ui-datepicker-next ui-corner-all" onclick="DP_hs_'+dpuuid+".datepicker._adjustDate('#"+e.id+"', +"+a+", 'M');\" title=\""+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+y+"</span></a>":i?"":'<a style="direction:ltr" class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+y+'"><span class="ui-icon ui-icon-circle-triangle-'+(n?"w":"e")+'">'+y+"</span></a>";var w=this._get(e,"currentText");var E=this._get(e,"gotoCurrent")&&e.currentDay?l:t;w=!s?w:this.formatDate(w,E,this._getFormatConfig(e));var S=!e.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_hs_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(e,"closeText")+"</button>":"";var x=r?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(n?S:"")+(this._isInRange(e,E)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_hs_'+dpuuid+".datepicker._gotoToday('#"+e.id+"');\">"+w+"</button>":"")+(n?"":S)+"</div>":"";var T=parseInt(this._get(e,"firstDay"),10);T=isNaN(T)?0:T;var N=this._get(e,"showWeek");var C=this._get(e,"dayNames");var k=this._get(e,"dayNamesShort");var L=this._get(e,"dayNamesMin");var A=this._get(e,"monthNames");var O=this._get(e,"monthNamesShort");var M=this._get(e,"beforeShowDay");var _=this._get(e,"showOtherMonths");var D=this._get(e,"selectOtherMonths");var P=this._get(e,"calculateWeek")||this.iso8601Week;var H=this._getDefaultDate(e);var B="";for(var j=0;j<o[0];j++){var F="";this.maxRows=4;for(var I=0;I<o[1];I++){var q=this._daylightSavingAdjust(new this.CDate(d,p,e.selectedDay));var R=" ui-corner-all";var U="";if(f){U+='<div class="ui-datepicker-group';if(o[1]>1){switch(I){case 0:U+=" ui-datepicker-group-first";R=" ui-corner-"+(n?"right":"left");break;case o[1]-1:U+=" ui-datepicker-group-last";R=" ui-corner-"+(n?"left":"right");break;default:U+=" ui-datepicker-group-middle";R="";break}}U+='">'}U+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+R+'">'+(/all|left/.test(R)&&j==0?n?b:g:"")+(/all|right/.test(R)&&j==0?n?g:b:"")+this._generateMonthYearHeader(e,p,d,c,h,j>0||I>0,A,O)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var z=N?'<th class="ui-datepicker-week-col">'+this._get(e,"weekHeader")+"</th>":"";for(var W=0;W<7;W++){var X=(W+T)%7;z+="<th"+((W+T+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+C[X]+'">'+L[X]+"</span></th>"}U+=z+"</tr></thead><tbody>";var V=this._getDaysInMonth(d,p);if(d==e.selectedYear&&p==e.selectedMonth){e.selectedDay=Math.min(e.selectedDay,V)}var $=(this._getFirstDayOfMonth(d,p)-T+7)%7;var J=Math.ceil(($+V)/7);var K=f?this.maxRows>J?this.maxRows:J:J;this.maxRows=K;var Q=this._daylightSavingAdjust(new this.CDate(d,p,1-$));for(var G=0;G<K;G++){U+="<tr>";var Y=!N?"":'<td class="ui-datepicker-week-col">'+this._get(e,"calculateWeek")(Q)+"</td>";for(var W=0;W<7;W++){var Z=M?M.apply(e.input?e.input[0]:null,[Q]):[true,""];var et=Q.getMonth()!=p;var tt=et&&!D||!Z[0]||c&&this._compareDate(Q,"<",c)||h&&this._compareDate(Q,">",h);Y+='<td class="'+((W+T+6)%7>=5?" ui-datepicker-week-end":"")+(et?" ui-datepicker-other-month":"")+(Q.getTime()==q.getTime()&&p==e.selectedMonth&&e._keyEvent||H.getTime()==Q.getTime()&&H.getTime()==q.getTime()?" "+this._dayOverClass:"")+(tt?" "+this._unselectableClass+" ui-state-disabled":"")+(et&&!_?"":" "+Z[1]+(Q.getTime()==l.getTime()?" "+this._currentClass:"")+(Q.getTime()==t.getTime()?" ui-datepicker-today":""))+'"'+((!et||_)&&Z[2]?' title="'+Z[2]+'"':"")+(tt?"":' onclick="DP_hs_'+dpuuid+".datepicker._selectDay('#"+e.id+"',"+Q.getMonth()+","+Q.getFullYear()+', this);return false;"')+">"+(et&&!_?" ":tt?'<span class="ui-state-default">'+Q.getDate()+"</span>":'<a class="ui-state-default'+(Q.getTime()==t.getTime()?" ui-state-highlight":"")+(Q.getTime()==l.getTime()?" ui-state-active":"")+(et?" ui-priority-secondary":"")+'" href="#">'+Q.getDate()+"</a>")+"</td>";Q.setDate(Q.getDate()+1);Q=this._daylightSavingAdjust(Q)}U+=Y+"</tr>"}p++;if(p>11){p=0;d++}U+="</tbody></table>"+(f?"</div>"+(o[0]>0&&I==o[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");F+=U}B+=F}B+=x+(hs.browser.msie&&parseInt(hs.browser.version,10)<7&&!e.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");e._keyEvent=false;return B},_generateMonthYearHeader:function(e,t,n,r,i,s,o,u){var a=this._get(e,"changeMonth");var f=this._get(e,"changeYear");var l=this._get(e,"showMonthAfterYear");var c='<div class="ui-datepicker-title">';var h="";if(s||!a){h+='<span class="ui-datepicker-month">'+o[t]+"</span>"}else{var p=r&&r.getFullYear()==n;var d=i&&i.getFullYear()==n;h+='<select class="ui-datepicker-month" onchange="DP_hs_'+dpuuid+".datepicker._selectMonthYear('#"+e.id+"', this, 'M');\" onclick=\"DP_hs_"+dpuuid+".datepicker._clickMonthYear('#"+e.id+"');\">";for(var v=0;v<12;v++){if((!p||v>=r.getMonth())&&(!d||v<=i.getMonth())){h+='<option value="'+v+'"'+(v==t?' selected="selected"':"")+">"+u[v]+"</option>"}}h+="</select>"}if(!l){c+=h+(s||!(a&&f)?" ":"")}if(!e.yearshtml){e.yearshtml="";if(s||!f){c+='<span class="ui-datepicker-year">'+n+"</span>"}else{var m=this._get(e,"yearRange").split(":");var g=(new this.CDate).getFullYear();var y=function(e){var t=e.match(/c[+-].*/)?n+parseInt(e.substring(1),10):e.match(/[+-].*/)?g+parseInt(e,10):parseInt(e,10);return isNaN(t)?g:t};var b=y(m[0]);var w=Math.max(b,y(m[1]||""));b=r?Math.max(b,r.getFullYear()):b;w=i?Math.min(w,i.getFullYear()):w;e.yearshtml+='<select class="ui-datepicker-year" onchange="DP_hs_'+dpuuid+".datepicker._selectMonthYear('#"+e.id+"', this, 'Y');\" onclick=\"DP_hs_"+dpuuid+".datepicker._clickMonthYear('#"+e.id+"');\">";for(;b<=w;b++){e.yearshtml+='<option value="'+b+'"'+(b==n?' selected="selected"':"")+">"+b+"</option>"}e.yearshtml+="</select>";c+=e.yearshtml;e.yearshtml=null}}c+=this._get(e,"yearSuffix");if(l){c+=(s||!(a&&f)?" ":"")+h}c+="</div>";return c},_adjustInstDate:function(e,t,n){var r=e.drawYear+(n=="Y"?t:0);var i=e.drawMonth+(n=="M"?t:0);var s=Math.min(e.selectedDay,this._getDaysInMonth(r,i))+(n=="D"?t:0);var o=this._restrictMinMax(e,this._daylightSavingAdjust(new this.CDate(r,i,s)));e.selectedDay=o.getDate();e.drawMonth=e.selectedMonth=o.getMonth();e.drawYear=e.selectedYear=o.getFullYear();if(n=="M"||n=="Y"){this._notifyChange(e)}},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min");var r=this._getMinMaxDate(e,"max");var i=n&&this._compareDate(t,"<",n)?n:t;i=r&&this._compareDate(i,">",r)?r:i;return i},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");if(t){t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])}},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return t==null?[1,1]:typeof t=="number"?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new this.CDate(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return(new this.CDate(e,t,1)).getDay()},_canAdjustMonth:function(e,t,n,r){var i=this._getNumberOfMonths(e);var s=this._daylightSavingAdjust(new this.CDate(n,r+(t<0?t:i[0]*i[1]),1));if(t<0){s.setDate(this._getDaysInMonth(s.getFullYear(),s.getMonth()))}return this._isInRange(e,s)},_isInRange:function(e,t){var n=this._getMinMaxDate(e,"min");var r=this._getMinMaxDate(e,"max");return(!n||t.getTime()>=n.getTime())&&(!r||t.getTime()<=r.getTime())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");this.CDate=this._get(e,"calendar");t=typeof t!="string"?t:(new this.CDate).getFullYear()%100+parseInt(t,10);return{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,r){if(!t){e.currentDay=e.selectedDay;e.currentMonth=e.selectedMonth;e.currentYear=e.selectedYear}var i=t?typeof t=="object"?t:this._daylightSavingAdjust(new this.CDate(r,n,t)):this._daylightSavingAdjust(new this.CDate(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))},_compareDate:function(e,t,n){if(e&&n){if(e.getGregorianDate){e=e.getGregorianDate()}if(n.getGregorianDate){n=n.getGregorianDate()}if(t=="<"){return e<n}return e>n}else{return null}}});hs.fn.datepicker=function(e){if(!this.length){return this}if(!hs.datepicker.initialized){hs(document).mousedown(hs.datepicker._checkExternalClick).find("body").append(hs.datepicker.dpDiv);hs.datepicker.initialized=true}var t=Array.prototype.slice.call(arguments,1);if(typeof e=="string"&&(e=="isDisabled"||e=="getDate"||e=="widget")){return hs.datepicker["_"+e+"Datepicker"].apply(hs.datepicker,[this[0]].concat(t))}if(e=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return hs.datepicker["_"+e+"Datepicker"].apply(hs.datepicker,[this[0]].concat(t))}return this.each(function(){typeof e=="string"?hs.datepicker["_"+e+"Datepicker"].apply(hs.datepicker,[this].concat(t)):hs.datepicker._attachDatepicker(this,e)})};hs.datepicker=new Datepicker;hs.datepicker.initialized=false;hs.datepicker.uuid=(new Date).getTime();hs.datepicker.version="1.8.14";window["DP_hs_"+dpuuid]=hs;var GREGORIAN_EPOCH=1721425.5;var ISLAMIC_EPOCH=1948439.5;var PERSIAN_EPOCH=1948320.5;hs(function(e){e.datepicker.regional.fa={calendar:JalaliDate,closeText:"بستن",prevText:"قبل",nextText:"بعد",currentText:"امروز",monthNames:["فروردين","ارديبهشت","خرداد","تير","مرداد","شهريور","مهر","آبان","آذر","دي","بهمن","اسفند"],monthNamesShort:["فروردين","ارديبهشت","خرداد","تير","مرداد","شهريور","مهر","آبان","آذر","دي","بهمن","اسفند"],dayNames:["يکشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],dayNamesShort:["يک","دو","سه","چهار","پنج","جمعه","شنبه"],dayNamesMin:["ي","د","س","چ","پ","ج","ش"],weekHeader:"ه",dateFormat:"dd/mm/yy",firstDay:6,isRTL:true,showMonthAfterYear:false,yearSuffix:"",calculateWeek:function(e){var t=new JalaliDate(e.getFullYear(),e.getMonth(),e.getDate()+(e.getDay()||7)-3);return Math.floor(Math.round((t.getTime()-(new JalaliDate(t.getFullYear(),0,1)).getTime())/864e5)/7)+1}};e.datepicker.setDefaults(e.datepicker.regional.fa)});hs(function(){hs(".hasDatepicker").datepicker({changeMonth:true,changeYear:true,showButtonPanel:true,onSelect:function(e,t){var n=new JalaliDate(t.selectedYear,t.selectedMonth,t.selectedDay);var r=n.getGregorianDate();var i=r.getMonth()+1;var s=r.getDate()<10?"0"+r.getDate():r.getDate();var o=r.getMonth()<9?"0"+i:i;hs(this).val(r.getFullYear()+"-"+o+"-"+s)}});hs("#export_date_start").datepicker({changeMonth:true,changeYear:true,showButtonPanel:true,onSelect:function(e,t){var n=new JalaliDate(t.selectedYear,t.selectedMonth,t.selectedDay);var r=n.getGregorianDate();var i=r.getMonth()+1;var s=r.getDate()<10?"0"+r.getDate():r.getDate();var o=r.getMonth()<9?"0"+i:i;hs("#_sale_price_dates_to").datepicker("option","minDate",new JalaliDate(t["selectedYear"],t["selectedMonth"],t["selectedDay"]));hs(this).val(r.getFullYear()+"-"+o+"-"+s)}});hs("#export_date_end").datepicker({changeMonth:true,changeYear:true,showButtonPanel:true,onSelect:function(e,t){var n=new JalaliDate(t.selectedYear,t.selectedMonth,t.selectedDay);var r=n.getGregorianDate();var i=r.getMonth()+1;var s=r.getDate()<10?"0"+r.getDate():r.getDate();var o=r.getMonth()<9?"0"+i:i;hs(this).val(r.getFullYear()+"-"+o+"-"+s)}})})})
|
|
include/Jalali.php
DELETED
@@ -1,493 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/* In The Name Of Allah */
|
3 |
-
/** Software Hijri_Shamsi , Solar(Jalali) Date and Time
|
4 |
-
Copyright(C)2011, Reza Gholampanahi , http://jdf.scr.ir
|
5 |
-
version 2.55 :: 1391/08/24 = 1433/12/18 = 2012/11/15 */
|
6 |
-
/* F */
|
7 |
-
function GF_jdate($format,$timestamp='',$none='',$time_zone='Asia/Tehran',$tr_num='fa'){
|
8 |
-
$T_sec=0;/* <= رفع خطاي زمان سرور ، با اعداد '+' و '-' بر حسب ثانيه */
|
9 |
-
if($time_zone!='local')date_default_timezone_set(($time_zone=='')?'Asia/Tehran':$time_zone);
|
10 |
-
$ts=$T_sec+(($timestamp=='' or $timestamp=='now')?time():GF_tr_num($timestamp));
|
11 |
-
$date=explode('_',date('H_i_j_n_O_P_s_w_Y',$ts));
|
12 |
-
list($j_y,$j_m,$j_d)=GF_gregorian_to_jalali($date[8],$date[3],$date[2]);
|
13 |
-
$doy=($j_m<7)?(($j_m-1)*31)+$j_d-1:(($j_m-7)*30)+$j_d+185;
|
14 |
-
$kab=($j_y%33%4-1==(int)($j_y%33*.05))?1:0;
|
15 |
-
$sl=strlen($format);
|
16 |
-
$out='';
|
17 |
-
for($i=0; $i<$sl; $i++){
|
18 |
-
$sub=substr($format,$i,1);
|
19 |
-
if($sub=='\\'){
|
20 |
-
$out.=substr($format,++$i,1);
|
21 |
-
continue;
|
22 |
-
}
|
23 |
-
switch($sub){
|
24 |
-
case'E':case'R':case'x':case'X':
|
25 |
-
$out.='http://jdf.scr.ir';
|
26 |
-
break;
|
27 |
-
case'B':case'e':case'g':
|
28 |
-
case'G':case'h':case'I':
|
29 |
-
case'T':case'u':case'Z':
|
30 |
-
$out.=date($sub,$ts);
|
31 |
-
break;
|
32 |
-
case'a':
|
33 |
-
$out.=($date[0]<12)?'ق.ظ':'ب.ظ';
|
34 |
-
break;
|
35 |
-
case'A':
|
36 |
-
$out.=($date[0]<12)?'قبل از ظهر':'بعد از ظهر';
|
37 |
-
break;
|
38 |
-
case'b':
|
39 |
-
$out.=(int)($j_m/3.1)+1;
|
40 |
-
break;
|
41 |
-
case'c':
|
42 |
-
$out.=$j_y.'/'.$j_m.'/'.$j_d.' ،'.$date[0].':'.$date[1].':'.$date[6].' '.$date[5];
|
43 |
-
break;
|
44 |
-
case'C':
|
45 |
-
$out.=(int)(($j_y+99)/100);
|
46 |
-
break;
|
47 |
-
case'd':
|
48 |
-
$out.=($j_d<10)?'0'.$j_d:$j_d;
|
49 |
-
break;
|
50 |
-
case'D':
|
51 |
-
$out.=GF_jdate_words(array('kh'=>$date[7]),' ');
|
52 |
-
break;
|
53 |
-
case'f':
|
54 |
-
$out.=GF_jdate_words(array('ff'=>$j_m),' ');
|
55 |
-
break;
|
56 |
-
case'F':
|
57 |
-
$out.=GF_jdate_words(array('mm'=>$j_m),' ');
|
58 |
-
break;
|
59 |
-
case'H':
|
60 |
-
$out.=$date[0];
|
61 |
-
break;
|
62 |
-
case'i':
|
63 |
-
$out.=$date[1];
|
64 |
-
break;
|
65 |
-
case'j':
|
66 |
-
$out.=$j_d;
|
67 |
-
break;
|
68 |
-
case'J':
|
69 |
-
$out.=GF_jdate_words(array('rr'=>$j_d),' ');
|
70 |
-
break;
|
71 |
-
case'k';
|
72 |
-
$out.=GF_tr_num(100-(int)($doy/($kab+365)*1000)/10,$tr_num);
|
73 |
-
break;
|
74 |
-
case'K':
|
75 |
-
$out.=GF_tr_num((int)($doy/($kab+365)*1000)/10,$tr_num);
|
76 |
-
break;
|
77 |
-
case'l':
|
78 |
-
$out.=GF_jdate_words(array('rh'=>$date[7]),' ');
|
79 |
-
break;
|
80 |
-
case'L':
|
81 |
-
$out.=$kab;
|
82 |
-
break;
|
83 |
-
case'm':
|
84 |
-
$out.=($j_m>9)?$j_m:'0'.$j_m;
|
85 |
-
break;
|
86 |
-
case'M':
|
87 |
-
$out.=GF_jdate_words(array('km'=>$j_m),' ');
|
88 |
-
break;
|
89 |
-
case'n':
|
90 |
-
$out.=$j_m;
|
91 |
-
break;
|
92 |
-
case'N':
|
93 |
-
$out.=$date[7]+1;
|
94 |
-
break;
|
95 |
-
case'o':
|
96 |
-
$jdw=($date[7]==6)?0:$date[7]+1;
|
97 |
-
$dny=364+$kab-$doy;
|
98 |
-
$out.=($jdw>($doy+3) and $doy<3)?$j_y-1:(((3-$dny)>$jdw and $dny<3)?$j_y+1:$j_y);
|
99 |
-
break;
|
100 |
-
case'O':
|
101 |
-
$out.=$date[4];
|
102 |
-
break;
|
103 |
-
case'p':
|
104 |
-
$out.=GF_jdate_words(array('mb'=>$j_m),' ');
|
105 |
-
break;
|
106 |
-
case'P':
|
107 |
-
$out.=$date[5];
|
108 |
-
break;
|
109 |
-
case'q':
|
110 |
-
$out.=GF_jdate_words(array('sh'=>$j_y),' ');
|
111 |
-
break;
|
112 |
-
case'Q':
|
113 |
-
$out.=$kab+364-$doy;
|
114 |
-
break;
|
115 |
-
case'r':
|
116 |
-
$key=GF_jdate_words(array('rh'=>$date[7],'mm'=>$j_m));
|
117 |
-
$out.=$date[0].':'.$date[1].':'.$date[6].' '.$date[4]
|
118 |
-
.' '.$key['rh'].'، '.$j_d.' '.$key['mm'].' '.$j_y;
|
119 |
-
break;
|
120 |
-
case's':
|
121 |
-
$out.=$date[6];
|
122 |
-
break;
|
123 |
-
case'S':
|
124 |
-
$out.='ام';
|
125 |
-
break;
|
126 |
-
case't':
|
127 |
-
$out.=($j_m!=12)?(31-(int)($j_m/6.5)):($kab+29);
|
128 |
-
break;
|
129 |
-
case'U':
|
130 |
-
$out.=$ts;
|
131 |
-
break;
|
132 |
-
case'v':
|
133 |
-
$out.=GF_jdate_words(array('ss'=>substr($j_y,2,2)),' ');
|
134 |
-
break;
|
135 |
-
case'V':
|
136 |
-
$out.=GF_jdate_words(array('ss'=>$j_y),' ');
|
137 |
-
break;
|
138 |
-
case'w':
|
139 |
-
$out.=($date[7]==6)?0:$date[7]+1;
|
140 |
-
break;
|
141 |
-
case'W':
|
142 |
-
$avs=(($date[7]==6)?0:$date[7]+1)-($doy%7);
|
143 |
-
if($avs<0)$avs+=7;
|
144 |
-
$num=(int)(($doy+$avs)/7);
|
145 |
-
if($avs<4){
|
146 |
-
$num++;
|
147 |
-
}elseif($num<1){
|
148 |
-
$num=($avs==4 or $avs==(($j_y%33%4-2==(int)($j_y%33*.05))?5:4))?53:52;
|
149 |
-
}
|
150 |
-
$aks=$avs+$kab;
|
151 |
-
if($aks==7)$aks=0;
|
152 |
-
$out.=(($kab+363-$doy)<$aks and $aks<3)?'01':(($num<10)?'0'.$num:$num);
|
153 |
-
break;
|
154 |
-
case'y':
|
155 |
-
$out.=substr($j_y,2,2);
|
156 |
-
break;
|
157 |
-
case'Y':
|
158 |
-
$out.=$j_y;
|
159 |
-
break;
|
160 |
-
case'z':
|
161 |
-
$out.=$doy;
|
162 |
-
break;
|
163 |
-
default:$out.=$sub;
|
164 |
-
}
|
165 |
-
}
|
166 |
-
return($tr_num!='en')?GF_tr_num($out,'fa','.'):$out;
|
167 |
-
}
|
168 |
-
/* F */
|
169 |
-
function GF_jstrftime($format,$timestamp='',$none='',$time_zone='Asia/Tehran',$tr_num='fa'){
|
170 |
-
$T_sec=0;/* <= رفع خطاي زمان سرور ، با اعداد '+' و '-' بر حسب ثانيه */
|
171 |
-
if($time_zone!='local')date_default_timezone_set(($time_zone=='')?'Asia/Tehran':$time_zone);
|
172 |
-
$ts=$T_sec+(($timestamp=='' or $timestamp=='now')?time():GF_tr_num($timestamp));
|
173 |
-
$date=explode('_',date('h_H_i_j_n_s_w_Y',$ts));
|
174 |
-
list($j_y,$j_m,$j_d)=GF_gregorian_to_jalali($date[7],$date[4],$date[3]);
|
175 |
-
$doy=($j_m<7)?(($j_m-1)*31)+$j_d-1:(($j_m-7)*30)+$j_d+185;
|
176 |
-
$kab=($j_y%33%4-1==(int)($j_y%33*.05))?1:0;
|
177 |
-
$sl=strlen($format);
|
178 |
-
$out='';
|
179 |
-
for($i=0; $i<$sl; $i++){
|
180 |
-
$sub=substr($format,$i,1);
|
181 |
-
if($sub=='%'){
|
182 |
-
$sub=substr($format,++$i,1);
|
183 |
-
}else{
|
184 |
-
$out.=$sub;
|
185 |
-
continue;
|
186 |
-
}
|
187 |
-
switch($sub){
|
188 |
-
/* Day */
|
189 |
-
case'a':
|
190 |
-
$out.=GF_jdate_words(array('kh'=>$date[6]),' ');
|
191 |
-
break;
|
192 |
-
case'A':
|
193 |
-
$out.=GF_jdate_words(array('rh'=>$date[6]),' ');
|
194 |
-
break;
|
195 |
-
case'd':
|
196 |
-
$out.=($j_d<10)?'0'.$j_d:$j_d;
|
197 |
-
break;
|
198 |
-
case'e':
|
199 |
-
$out.=($j_d<10)?' '.$j_d:$j_d;
|
200 |
-
break;
|
201 |
-
case'j':
|
202 |
-
$out.=str_pad($doy+1,3,0,STR_PAD_LEFT);
|
203 |
-
break;
|
204 |
-
case'u':
|
205 |
-
$out.=$date[6]+1;
|
206 |
-
break;
|
207 |
-
case'w':
|
208 |
-
$out.=($date[6]==6)?0:$date[6]+1;
|
209 |
-
break;
|
210 |
-
/* Week */
|
211 |
-
case'U':
|
212 |
-
$avs=(($date[6]<5)?$date[6]+2:$date[6]-5)-($doy%7);
|
213 |
-
if($avs<0)$avs+=7;
|
214 |
-
$num=(int)(($doy+$avs)/7)+1;
|
215 |
-
if($avs>3 or $avs==1)$num--;
|
216 |
-
$out.=($num<10)?'0'.$num:$num;
|
217 |
-
break;
|
218 |
-
case'V':
|
219 |
-
$avs=(($date[6]==6)?0:$date[6]+1)-($doy%7);
|
220 |
-
if($avs<0)$avs+=7;
|
221 |
-
$num=(int)(($doy+$avs)/7);
|
222 |
-
if($avs<4){
|
223 |
-
$num++;
|
224 |
-
}elseif($num<1){
|
225 |
-
$num=($avs==4 or $avs==(($j_y%33%4-2==(int)($j_y%33*.05))?5:4))?53:52;
|
226 |
-
}
|
227 |
-
$aks=$avs+$kab;
|
228 |
-
if($aks==7)$aks=0;
|
229 |
-
$out.=(($kab+363-$doy)<$aks and $aks<3)?'01':(($num<10)?'0'.$num:$num);
|
230 |
-
break;
|
231 |
-
case'W':
|
232 |
-
$avs=(($date[6]==6)?0:$date[6]+1)-($doy%7);
|
233 |
-
if($avs<0)$avs+=7;
|
234 |
-
$num=(int)(($doy+$avs)/7)+1;
|
235 |
-
if($avs>3)$num--;
|
236 |
-
$out.=($num<10)?'0'.$num:$num;
|
237 |
-
break;
|
238 |
-
/* Month */
|
239 |
-
case'b':
|
240 |
-
case'h':
|
241 |
-
$out.=GF_jdate_words(array('km'=>$j_m),' ');
|
242 |
-
break;
|
243 |
-
case'B':
|
244 |
-
$out.=GF_jdate_words(array('mm'=>$j_m),' ');
|
245 |
-
break;
|
246 |
-
case'm':
|
247 |
-
$out.=($j_m>9)?$j_m:'0'.$j_m;
|
248 |
-
break;
|
249 |
-
/* Year */
|
250 |
-
case'C':
|
251 |
-
$out.=substr($j_y,0,2);
|
252 |
-
break;
|
253 |
-
case'g':
|
254 |
-
$jdw=($date[6]==6)?0:$date[6]+1;
|
255 |
-
$dny=364+$kab-$doy;
|
256 |
-
$out.=substr(($jdw>($doy+3) and $doy<3)?$j_y-1:(((3-$dny)>$jdw and $dny<3)?$j_y+1:$j_y),2,2);
|
257 |
-
break;
|
258 |
-
case'G':
|
259 |
-
$jdw=($date[6]==6)?0:$date[6]+1;
|
260 |
-
$dny=364+$kab-$doy;
|
261 |
-
$out.=($jdw>($doy+3) and $doy<3)?$j_y-1:(((3-$dny)>$jdw and $dny<3)?$j_y+1:$j_y);
|
262 |
-
break;
|
263 |
-
case'y':
|
264 |
-
$out.=substr($j_y,2,2);
|
265 |
-
break;
|
266 |
-
case'Y':
|
267 |
-
$out.=$j_y;
|
268 |
-
break;
|
269 |
-
/* Time */
|
270 |
-
case'H':
|
271 |
-
$out.=$date[1];
|
272 |
-
break;
|
273 |
-
case'I':
|
274 |
-
$out.=$date[0];
|
275 |
-
break;
|
276 |
-
case'l':
|
277 |
-
$out.=($date[0]>9)?$date[0]:' '.(int)$date[0];
|
278 |
-
break;
|
279 |
-
case'M':
|
280 |
-
$out.=$date[2];
|
281 |
-
break;
|
282 |
-
case'p':
|
283 |
-
$out.=($date[1]<12)?'قبل از ظهر':'بعد از ظهر';
|
284 |
-
break;
|
285 |
-
case'P':
|
286 |
-
$out.=($date[1]<12)?'ق.ظ':'ب.ظ';
|
287 |
-
break;
|
288 |
-
case'r':
|
289 |
-
$out.=$date[0].':'.$date[2].':'.$date[5].' '.(($date[1]<12)?'قبل از ظهر':'بعد از ظهر');
|
290 |
-
break;
|
291 |
-
case'R':
|
292 |
-
$out.=$date[1].':'.$date[2];
|
293 |
-
break;
|
294 |
-
case'S':
|
295 |
-
$out.=$date[5];
|
296 |
-
break;
|
297 |
-
case'T':
|
298 |
-
$out.=$date[1].':'.$date[2].':'.$date[5];
|
299 |
-
break;
|
300 |
-
case'X':
|
301 |
-
$out.=$date[0].':'.$date[2].':'.$date[5];
|
302 |
-
break;
|
303 |
-
case'z':
|
304 |
-
$out.=date('O',$ts);
|
305 |
-
break;
|
306 |
-
case'Z':
|
307 |
-
$out.=date('T',$ts);
|
308 |
-
break;
|
309 |
-
/* Time and Date Stamps */
|
310 |
-
case'c':
|
311 |
-
$key=GF_jdate_words(array('rh'=>$date[6],'mm'=>$j_m));
|
312 |
-
$out.=$date[1].':'.$date[2].':'.$date[5].' '.date('P',$ts)
|
313 |
-
.' '.$key['rh'].'، '.$j_d.' '.$key['mm'].' '.$j_y;
|
314 |
-
break;
|
315 |
-
case'D':
|
316 |
-
$out.=substr($j_y,2,2).'/'.(($j_m>9)?$j_m:'0'.$j_m).'/'.(($j_d<10)?'0'.$j_d:$j_d);
|
317 |
-
break;
|
318 |
-
case'F':
|
319 |
-
$out.=$j_y.'-'.(($j_m>9)?$j_m:'0'.$j_m).'-'.(($j_d<10)?'0'.$j_d:$j_d);
|
320 |
-
break;
|
321 |
-
case's':
|
322 |
-
$out.=$ts;
|
323 |
-
break;
|
324 |
-
case'x':
|
325 |
-
$out.=substr($j_y,2,2).'/'.(($j_m>9)?$j_m:'0'.$j_m).'/'.(($j_d<10)?'0'.$j_d:$j_d);
|
326 |
-
break;
|
327 |
-
/* Miscellaneous */
|
328 |
-
case'n':
|
329 |
-
$out.="\n";
|
330 |
-
break;
|
331 |
-
case't':
|
332 |
-
$out.="\t";
|
333 |
-
break;
|
334 |
-
case'%':
|
335 |
-
$out.='%';
|
336 |
-
break;
|
337 |
-
default:$out.=$sub;
|
338 |
-
}
|
339 |
-
}
|
340 |
-
return($tr_num!='en')?GF_tr_num($out,'fa','.'):$out;
|
341 |
-
}
|
342 |
-
/* F */
|
343 |
-
function GF_jmktime($h='',$m='',$s='',$jm='',$jd='',$jy='',$is_dst=-1){
|
344 |
-
$h=GF_tr_num($h); $m=GF_tr_num($m); $s=GF_tr_num($s); $jm=GF_tr_num($jm); $jd=GF_tr_num($jd); $jy=GF_tr_num($jy);
|
345 |
-
if($h=='' and $m=='' and $s=='' and $jm=='' and $jd=='' and $jy==''){
|
346 |
-
return mktime();
|
347 |
-
}else{
|
348 |
-
list($year,$month,$day)=GF_jalali_to_gregorian($jy,$jm,$jd);
|
349 |
-
return mktime($h,$m,$s,$month,$day,$year,$is_dst);
|
350 |
-
}
|
351 |
-
}
|
352 |
-
/* F */
|
353 |
-
function GF_jgetdate($timestamp='',$none='',$tz='Asia/Tehran',$tn='en'){
|
354 |
-
$ts=($timestamp=='')?time():GF_tr_num($timestamp);
|
355 |
-
$jdate=explode('_',GF_jdate('F_G_i_j_l_n_s_w_Y_z',$ts,'',$tz,$tn));
|
356 |
-
return array(
|
357 |
-
'seconds'=>GF_tr_num((int)GF_tr_num($jdate[6]),$tn),
|
358 |
-
'minutes'=>GF_tr_num((int)GF_tr_num($jdate[2]),$tn),
|
359 |
-
'hours'=>$jdate[1],
|
360 |
-
'mday'=>$jdate[3],
|
361 |
-
'wday'=>$jdate[7],
|
362 |
-
'mon'=>$jdate[5],
|
363 |
-
'year'=>$jdate[8],
|
364 |
-
'yday'=>$jdate[9],
|
365 |
-
'weekday'=>$jdate[4],
|
366 |
-
'month'=>$jdate[0],
|
367 |
-
0=>GF_tr_num($ts,$tn)
|
368 |
-
);
|
369 |
-
}
|
370 |
-
/* F */
|
371 |
-
function GF_jcheckdate($jm,$jd,$jy){
|
372 |
-
$jm=GF_tr_num($jm); $jd=GF_tr_num($jd); $jy=GF_tr_num($jy);
|
373 |
-
$l_d=($jm==12)?(($jy%33%4-1==(int)($jy%33*.05))?30:29):31-(int)($jm/6.5);
|
374 |
-
return($jm>0 and $jd>0 and $jy>0 and $jm<13 and $jd<=$l_d)?true:false;
|
375 |
-
}
|
376 |
-
/* F */
|
377 |
-
function GF_tr_num($str,$mod='en',$mf='٫'){
|
378 |
-
$num_a=array('0','1','2','3','4','5','6','7','8','9','.');
|
379 |
-
$key_a=array('۰','۱','۲','۳','۴','۵','۶','۷','۸','۹',$mf);
|
380 |
-
return($mod=='fa')?str_replace($num_a,$key_a,$str):str_replace($key_a,$num_a,$str);
|
381 |
-
}
|
382 |
-
/* F */
|
383 |
-
function GF_jdate_words($array,$mod=''){
|
384 |
-
foreach($array as $type=>$num){
|
385 |
-
$num=(int)GF_tr_num($num);
|
386 |
-
switch($type){
|
387 |
-
case'ss':
|
388 |
-
$sl=strlen($num);
|
389 |
-
$xy3=substr($num,2-$sl,1);
|
390 |
-
$h3=$h34=$h4='';
|
391 |
-
if($xy3==1){
|
392 |
-
$p34='';
|
393 |
-
$k34=array('ده','یازده','دوازده','سیزده','چهارده','پانزده','شانزده','هفده','هجده','نوزده');
|
394 |
-
$h34=$k34[substr($num,2-$sl,2)-10];
|
395 |
-
}else{
|
396 |
-
$xy4=substr($num,3-$sl,1);
|
397 |
-
$p34=($xy3==0 or $xy4==0)?'':' و ';
|
398 |
-
$k3=array('','','بیست','سی','چهل','پنجاه','شصت','هفتاد','هشتاد','نود');
|
399 |
-
$h3=$k3[$xy3];
|
400 |
-
$k4=array('','یک','دو','سه','چهار','پنج','شش','هفت','هشت','نه');
|
401 |
-
$h4=$k4[$xy4];
|
402 |
-
}
|
403 |
-
$array[$type]=(($num>99)?str_ireplace(array('12','13','14','19','20')
|
404 |
-
,array('هزار و دویست','هزار و سیصد','هزار و چهارصد','هزار و نهصد','دوهزار')
|
405 |
-
,substr($num,0,2)).((substr($num,2,2)=='00')?'':' و '):'').$h3.$p34.$h34.$h4;
|
406 |
-
break;
|
407 |
-
case'mm':
|
408 |
-
$key=array
|
409 |
-
('فروردین','اردیبهشت','خرداد','تیر','مرداد','شهریور','مهر','آبان','آذر','دی','بهمن','اسفند');
|
410 |
-
$array[$type]=$key[$num-1];
|
411 |
-
break;
|
412 |
-
case'rr':
|
413 |
-
$key=array('یک','دو','سه','چهار','پنج','شش','هفت','هشت','نه','ده','یازده','دوازده','سیزده',
|
414 |
-
'چهارده','پانزده','شانزده','هفده','هجده','نوزده','بیست','بیست و یک','بیست و دو','بیست و سه',
|
415 |
-
'بیست و چهار','بیست و پنج','بیست و شش','بیست و هفت','بیست و هشت','بیست و نه','سی','سی و یک');
|
416 |
-
$array[$type]=$key[$num-1];
|
417 |
-
break;
|
418 |
-
case'rh':
|
419 |
-
$key=array('یکشنبه','دوشنبه','سه شنبه','چهارشنبه','پنجشنبه','جمعه','شنبه');
|
420 |
-
$array[$type]=$key[$num];
|
421 |
-
break;
|
422 |
-
case'sh':
|
423 |
-
$key=array('مار','اسب','گوسفند','میمون','مرغ','سگ','خوک','موش','گاو','پلنگ','خرگوش','نهنگ');
|
424 |
-
$array[$type]=$key[$num%12];
|
425 |
-
break;
|
426 |
-
case'mb':
|
427 |
-
$key=array('حمل','ثور','جوزا','سرطان','اسد','سنبله','میزان','عقرب','قوس','جدی','دلو','حوت');
|
428 |
-
$array[$type]=$key[$num-1];
|
429 |
-
break;
|
430 |
-
case'ff':
|
431 |
-
$key=array('بهار','تابستان','پاییز','زمستان');
|
432 |
-
$array[$type]=$key[(int)($num/3.1)];
|
433 |
-
break;
|
434 |
-
case'km':
|
435 |
-
$key=array('فر','ار','خر','تی','مر','شه','مه','آب','آذ','دی','به','اس');
|
436 |
-
$array[$type]=$key[$num-1];
|
437 |
-
break;
|
438 |
-
case'kh':
|
439 |
-
$key=array('ی','د','س','چ','پ','ج','ش');
|
440 |
-
$array[$type]=$key[$num];
|
441 |
-
break;
|
442 |
-
default:$array[$type]=$num;
|
443 |
-
}
|
444 |
-
}
|
445 |
-
return($mod=='')?$array:implode($mod,$array);
|
446 |
-
}
|
447 |
-
/** Convertor from and to Gregorian and Jalali (Hijri_Shamsi,Solar) Functions
|
448 |
-
Copyright(C)2011, Reza Gholampanahi [ http://jdf.scr.ir/jdf ] version 2.50 */
|
449 |
-
/* F */
|
450 |
-
function GF_gregorian_to_jalali($g_y,$g_m,$g_d,$mod=''){
|
451 |
-
$g_y=GF_tr_num($g_y); $g_m=GF_tr_num($g_m); $g_d=GF_tr_num($g_d);/* <= :اين سطر ، جزء تابع اصلي نيست */
|
452 |
-
$d_4=$g_y%4;
|
453 |
-
$g_a=array(0,0,31,59,90,120,151,181,212,243,273,304,334);
|
454 |
-
$doy_g=$g_a[(int)$g_m]+$g_d;
|
455 |
-
if($d_4==0 and $g_m>2)$doy_g++;
|
456 |
-
$d_33=(int)((($g_y-16)%132)*.0305);
|
457 |
-
$a=($d_33==3 or $d_33<($d_4-1) or $d_4==0)?286:287;
|
458 |
-
$b=(($d_33==1 or $d_33==2) and ($d_33==$d_4 or $d_4==1))?78:(($d_33==3 and $d_4==0)?80:79);
|
459 |
-
if((int)(($g_y-10)/63)==30){$a--;$b++;}
|
460 |
-
if($doy_g>$b){
|
461 |
-
$jy=$g_y-621; $doy_j=$doy_g-$b;
|
462 |
-
}else{
|
463 |
-
$jy=$g_y-622; $doy_j=$doy_g+$a;
|
464 |
-
}
|
465 |
-
if($doy_j<187){
|
466 |
-
$jm=(int)(($doy_j-1)/31); $jd=$doy_j-(31*$jm++);
|
467 |
-
}else{
|
468 |
-
$jm=(int)(($doy_j-187)/30); $jd=$doy_j-186-($jm*30); $jm+=7;
|
469 |
-
}
|
470 |
-
return($mod=='')?array($jy,$jm,$jd):$jy.$mod.$jm.$mod.$jd;
|
471 |
-
}
|
472 |
-
/* F */
|
473 |
-
function GF_jalali_to_gregorian($j_y,$j_m,$j_d,$mod=''){
|
474 |
-
$j_y=GF_tr_num($j_y); $j_m=GF_tr_num($j_m); $j_d=GF_tr_num($j_d);/* <= :اين سطر ، جزء تابع اصلي نيست */
|
475 |
-
$d_4=($j_y+1)%4;
|
476 |
-
$doy_j=($j_m<7)?(($j_m-1)*31)+$j_d:(($j_m-7)*30)+$j_d+186;
|
477 |
-
$d_33=(int)((($j_y-55)%132)*.0305);
|
478 |
-
$a=($d_33!=3 and $d_4<=$d_33)?287:286;
|
479 |
-
$b=(($d_33==1 or $d_33==2) and ($d_33==$d_4 or $d_4==1))?78:(($d_33==3 and $d_4==0)?80:79);
|
480 |
-
if((int)(($j_y-19)/63)==20){$a--;$b++;}
|
481 |
-
if($doy_j<=$a){
|
482 |
-
$gy=$j_y+621; $gd=$doy_j+$b;
|
483 |
-
}else{
|
484 |
-
$gy=$j_y+622; $gd=$doy_j-$a;
|
485 |
-
}
|
486 |
-
foreach(array(0,31,($gy%4==0)?29:28,31,30,31,30,31,31,30,31,30,31) as $gm=>$v){
|
487 |
-
if($gd<=$v)break;
|
488 |
-
$gd-=$v;
|
489 |
-
}
|
490 |
-
return($mod=='')?array($gy,$gm,$gd):$gy.$mod.$gm.$mod.$gd;
|
491 |
-
}
|
492 |
-
/* [ jdf.php ] version 2.55 ?> Download new version from [ http://jdf.scr.ir ] */
|
493 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/Live_Preview.php
DELETED
@@ -1,102 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class GFIRLivePreview {
|
3 |
-
var $post_type = 'gf_live_preview';
|
4 |
-
function __construct( $args = array() ) {
|
5 |
-
if( ! property_exists( 'GFCommon', 'version' ) || ! version_compare( GFCommon::$version, '1.8', '>=' ) )
|
6 |
-
return;
|
7 |
-
$this->_args = wp_parse_args( $args, array(
|
8 |
-
'id' => 0,
|
9 |
-
'title' => true,
|
10 |
-
'description' => true,
|
11 |
-
'ajax' => true
|
12 |
-
) );
|
13 |
-
add_action( 'init', array( $this, 'register_preview_post_type' ) );
|
14 |
-
add_action( 'wp', array( $this, 'maybe_load_preview_functionality' ) );
|
15 |
-
add_action( 'admin_footer', array( $this, 'display_preview_link' ) );
|
16 |
-
}
|
17 |
-
function register_preview_post_type() {
|
18 |
-
$args = array(
|
19 |
-
'label' => __( 'پیشنمایش فرم' , 'Persian_Gravityforms_By_HANNANStd'),
|
20 |
-
'description' => __( 'اضافه کردن پیشنمایش فرم در فرانت اند سایت' , 'Persian_Gravityforms_By_HANNANStd'),
|
21 |
-
'public' => false,
|
22 |
-
'publicly_queryable' => true,
|
23 |
-
'has_archive' => true,
|
24 |
-
'can_export' => false,
|
25 |
-
'supports' => false
|
26 |
-
);
|
27 |
-
register_post_type( $this->post_type, $args );
|
28 |
-
$preview_post = get_posts( array( 'post_type' => $this->post_type ) );
|
29 |
-
if( empty( $preview_post ) ) {
|
30 |
-
$post_id = wp_insert_post( array(
|
31 |
-
'post_type' => $this->post_type,
|
32 |
-
'post_title' => __( 'پیشنمایش فرم' ),
|
33 |
-
'post_status' => 'publish'
|
34 |
-
) );
|
35 |
-
}
|
36 |
-
}
|
37 |
-
function maybe_load_preview_functionality() {
|
38 |
-
global $wp_query;
|
39 |
-
if( ! $this->is_live_preview() )
|
40 |
-
return;
|
41 |
-
$this->live_preview_hooks();
|
42 |
-
foreach( $wp_query->posts as &$post ) {
|
43 |
-
$post->post_content = $this->get_shortcode();
|
44 |
-
}
|
45 |
-
}
|
46 |
-
function live_preview_hooks() {
|
47 |
-
add_filter( 'template_include', array( $this, 'load_preview_template' ) );
|
48 |
-
add_filter( 'the_content', array( $this, 'modify_preview_post_content' ) );
|
49 |
-
}
|
50 |
-
function display_preview_link() {
|
51 |
-
if( ! $this->is_applicable_page() )
|
52 |
-
return;
|
53 |
-
$form_id = rgget( 'id' );
|
54 |
-
$url = get_bloginfo("wpurl") . '/?post_type=gf_live_preview&id=' . $form_id;
|
55 |
-
?>
|
56 |
-
<script type="text/javascript">
|
57 |
-
(function($){
|
58 |
-
$( '<li class="gf_form_toolbar_preview"><a style="position:relative" id="gf-live-preview" href="<?php echo $url; ?>" target="_blank">' +
|
59 |
-
'<i class="fa fa-eye" style="position: absolute; text-shadow: 0px 0px 5px rgb(255, 255, 255); z-index: 99; line-height: 7px; left: 0px font-size: 9px; top: 6px; background-color: rgb(243, 243, 243);"></i>' +
|
60 |
-
'<i class="fa fa-file-o" style="margin-left: 5px; line-height: 12px; font-size: 18px; position: relative; top: 2px;"></i>' +
|
61 |
-
'<?php _e( 'Live Preview' ); ?>' +
|
62 |
-
'</a></li>' )
|
63 |
-
.insertAfter( 'li.gf_form_toolbar_preview' );
|
64 |
-
})(jQuery);
|
65 |
-
</script>
|
66 |
-
<?php
|
67 |
-
}
|
68 |
-
function is_applicable_page() {
|
69 |
-
return in_array( rgget( 'page' ), array( 'gf_edit_forms', 'gf_entries' ) ) && rgget( 'id' );
|
70 |
-
}
|
71 |
-
function load_preview_template( $template ) {
|
72 |
-
return get_page_template();
|
73 |
-
}
|
74 |
-
function modify_preview_post_content( $content ) {
|
75 |
-
return $this->get_shortcode();
|
76 |
-
}
|
77 |
-
function get_shortcode( $args = array() ) {
|
78 |
-
if( !is_user_logged_in() )
|
79 |
-
return '<p>' . __( 'برای مشاهده پیشنمایش فرم باید در سایت وارد شوید .' , 'Persian_Gravityforms_By_HANNANStd' ) . '</p>' . wp_login_form( array( 'echo' => false ) );
|
80 |
-
if( !GFCommon::current_user_can_any( 'gravityforms_preview_forms' ) )
|
81 |
-
return __( 'متاسفانه شما سطح دسترسی لازم برای مشاهده پیشنمایش فرم را ندارید .' , 'Persian_Gravityforms_By_HANNANStd' );
|
82 |
-
if( empty( $args ) )
|
83 |
-
$args = $this->get_shortcode_parameters_from_query_string();
|
84 |
-
extract( wp_parse_args( $args, $this->_args ) );
|
85 |
-
$title = $title === true ? 'true' : 'false';
|
86 |
-
$description = $description === true ? 'true' : 'false';
|
87 |
-
$ajax = $ajax === true ? 'true' : 'false';
|
88 |
-
return "[gravityform id='$id' title='$title' description='$description' ajax='$ajax']";
|
89 |
-
}
|
90 |
-
function get_shortcode_parameters_from_query_string() {
|
91 |
-
return array_filter( array(
|
92 |
-
'id' => rgget( 'id' ),
|
93 |
-
'title' => rgget( 'title' ),
|
94 |
-
'description' => rgget( 'description' ),
|
95 |
-
'ajax' => rgget( 'ajax' )
|
96 |
-
) );
|
97 |
-
}
|
98 |
-
function is_live_preview() {
|
99 |
-
return is_post_type_archive( $this->post_type );
|
100 |
-
}
|
101 |
-
}
|
102 |
-
new GFIRLivePreview( array( 'title' => true, 'description' => true,'ajax' => true) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/News_Letter.php
DELETED
@@ -1,63 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Post Permalink Merge Tag
|
4 |
-
* http://GravityForms.ir
|
5 |
-
*/
|
6 |
-
class GFIR_NewsLetter {
|
7 |
-
|
8 |
-
function __construct() {
|
9 |
-
add_filter('gform_notification_events', array( $this, 'Add_Manual_Notification_Event') );
|
10 |
-
add_filter('gform_before_resend_notifications', array( $this, 'Manual_Notification_Event_Conditional_Logic'), 10, 2);
|
11 |
-
}
|
12 |
-
|
13 |
-
public function Add_Manual_Notification_Event( $events ) {
|
14 |
-
$events['newsletter'] = __( 'خبرنامه' );
|
15 |
-
return $events;
|
16 |
-
}
|
17 |
-
|
18 |
-
public function Manual_Notification_Event_Conditional_Logic($form, $leads) {
|
19 |
-
|
20 |
-
if ( empty( $leads ) || empty( $form ) ) {
|
21 |
-
_e( 'There was an error while resending the notifications.', 'gravityforms' );
|
22 |
-
die();
|
23 |
-
};
|
24 |
-
|
25 |
-
$notifications = json_decode( rgpost( 'notifications' ) );
|
26 |
-
if ( ! is_array( $notifications ) ) {
|
27 |
-
die( __( 'No notifications have been selected. Please select a notification to be sent.', 'gravityforms' ) );
|
28 |
-
}
|
29 |
-
|
30 |
-
if ( ! rgempty( 'sendTo', $_POST ) && ! GFCommon::is_valid_email_list( rgpost( 'sendTo' ) ) ) {
|
31 |
-
die( __( 'The <strong>Send To</strong> email address provided is not valid.', 'gravityforms' ) );
|
32 |
-
}
|
33 |
-
|
34 |
-
foreach ( $leads as $lead_id ) {
|
35 |
-
$lead = RGFormsModel::get_lead( $lead_id );
|
36 |
-
foreach ( $notifications as $notification_id ) {
|
37 |
-
|
38 |
-
$notification = $form['notifications'][ $notification_id ];
|
39 |
-
if ( ! $notification ) {
|
40 |
-
continue;
|
41 |
-
}
|
42 |
-
|
43 |
-
//overriding To email if one was specified
|
44 |
-
if ( rgpost( 'sendTo' ) ) {
|
45 |
-
$notification['to'] = rgpost( 'sendTo' );
|
46 |
-
$notification['toType'] = 'email';
|
47 |
-
}
|
48 |
-
|
49 |
-
if ( $notification['event'] == 'newsletter') {
|
50 |
-
GFCommon::send_notifications( $notification, $form, $lead, true, $notification['event'] );
|
51 |
-
}
|
52 |
-
else {
|
53 |
-
GFCommon::send_notification( $notification, $form, $lead );
|
54 |
-
}
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
die();
|
59 |
-
return;
|
60 |
-
|
61 |
-
}
|
62 |
-
|
63 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/Post_Content_Merge_Tags.php
DELETED
@@ -1,154 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class PersianGravityForms_Post_Content_Merge_Tags {
|
3 |
-
public static $_entry = null;
|
4 |
-
private static $instance = null;
|
5 |
-
public static function get_instance( $args = array() ) {
|
6 |
-
if( self::$instance == null )
|
7 |
-
self::$instance = new self( $args );
|
8 |
-
return self::$instance;
|
9 |
-
}
|
10 |
-
function __construct( $args ) {
|
11 |
-
if( ! class_exists( 'GFForms' ) )
|
12 |
-
return;
|
13 |
-
$this->_args = wp_parse_args( $args, array(
|
14 |
-
'auto_append_id' => true,
|
15 |
-
'encrypt_id' => false,
|
16 |
-
) );
|
17 |
-
add_filter( 'the_content', array( $this, 'replace_merge_tags' ), 1 );
|
18 |
-
add_filter( 'gform_replace_merge_tags', array( $this, 'replace_encrypt_entry_id_merge_tag' ), 10, 3 );
|
19 |
-
if( ! empty( $this->_args['auto_append_id'] ) ) {
|
20 |
-
add_filter( 'gform_confirmation', array( $this, 'append_id_parameter' ), 20, 3 );
|
21 |
-
}
|
22 |
-
}
|
23 |
-
function replace_merge_tags( $post_content ) {
|
24 |
-
$wp_session = WP_Session::get_instance();
|
25 |
-
@session_start();
|
26 |
-
if ($wp_session['refid'])
|
27 |
-
$session = $wp_session['refid'];
|
28 |
-
else
|
29 |
-
$session = isset($_SESSION["refid"]) ? $_SESSION["refid"] : '';
|
30 |
-
$entry = $this->get_entry();
|
31 |
-
if( !$entry )
|
32 |
-
return $post_content;
|
33 |
-
$form = GFFormsModel::get_form_meta( $entry['form_id'] );
|
34 |
-
if ( $session == $form["id"].$entry["id"] ) {
|
35 |
-
$post_content = $this->replace_field_label_merge_tags( $post_content, $form );
|
36 |
-
$post_content = GFCommon::replace_variables( $post_content, $form, $entry, false, false, false );
|
37 |
-
}
|
38 |
-
return $post_content;
|
39 |
-
}
|
40 |
-
function replace_field_label_merge_tags( $text, $form ) {
|
41 |
-
preg_match_all( '/{([^:]+?)}/', $text, $matches, PREG_SET_ORDER );
|
42 |
-
if( empty( $matches ) )
|
43 |
-
return $text;
|
44 |
-
foreach( $matches as $match ) {
|
45 |
-
list( $search, $field_label ) = $match;
|
46 |
-
foreach( $form['fields'] as $field ) {
|
47 |
-
$full_input_id = false;
|
48 |
-
$matches_admin_label = rgar( $field, 'adminLabel' ) == $field_label;
|
49 |
-
$matches_field_label = false;
|
50 |
-
if( is_array( $field['inputs'] ) ) {
|
51 |
-
foreach( $field['inputs'] as $input ) {
|
52 |
-
if( GFFormsModel::get_label( $field, $input['id'] ) == $field_label ) {
|
53 |
-
$matches_field_label = true;
|
54 |
-
$input_id = $input['id'];
|
55 |
-
break;
|
56 |
-
}
|
57 |
-
}
|
58 |
-
} else {
|
59 |
-
$matches_field_label = GFFormsModel::get_label( $field ) == $field_label;
|
60 |
-
$input_id = $field['id'];
|
61 |
-
}
|
62 |
-
if( ! $matches_admin_label && ! $matches_field_label )
|
63 |
-
continue;
|
64 |
-
$replace = sprintf( '{%s:%s}', $field_label, (string) $input_id );
|
65 |
-
$text = str_replace( $search, $replace, $text );
|
66 |
-
break;
|
67 |
-
}
|
68 |
-
}
|
69 |
-
return $text;
|
70 |
-
}
|
71 |
-
function replace_encrypt_entry_id_merge_tag( $text, $form, $entry ) {
|
72 |
-
if( strpos( $text, '{encrypted_entry_id}' ) === false ) {
|
73 |
-
return $text;
|
74 |
-
}
|
75 |
-
$entry_id = rgar( $entry, 'id' );
|
76 |
-
if( $entry_id ) {
|
77 |
-
$entry_id = $this->prepare_id( $entry['id'], true );
|
78 |
-
}
|
79 |
-
return str_replace( '{encrypted_entry_id}', $entry_id, $text );
|
80 |
-
}
|
81 |
-
function append_id_parameter( $confirmation, $form, $entry ) {
|
82 |
-
$is_ajax_redirect = is_string( $confirmation ) && strpos( $confirmation, 'gformRedirect' );
|
83 |
-
$is_redirect = is_array( $confirmation ) && isset( $confirmation['redirect'] );
|
84 |
-
if( ! $this->is_auto_id_enabled( $form ) || ! ( $is_ajax_redirect || $is_redirect ) ) {
|
85 |
-
return $confirmation;
|
86 |
-
}
|
87 |
-
$id = $this->prepare_id( $entry['id'] );
|
88 |
-
if( $is_ajax_redirect ) {
|
89 |
-
preg_match_all( '/gformRedirect.+?(http.+?)(?=\'|")/', $confirmation, $matches, PREG_SET_ORDER );
|
90 |
-
list( $full_match, $url ) = $matches[0];
|
91 |
-
$redirect_url = add_query_arg( array( 'id' => $id ), $url );
|
92 |
-
$confirmation = str_replace( $url, $redirect_url, $confirmation );
|
93 |
-
} else {
|
94 |
-
$redirect_url = add_query_arg( array( 'id' => $id ), $confirmation['redirect'] );
|
95 |
-
$confirmation['redirect'] = $redirect_url;
|
96 |
-
}
|
97 |
-
return $confirmation;
|
98 |
-
}
|
99 |
-
function prepare_id( $entry_id, $force_encrypt = false ) {
|
100 |
-
$id = $entry_id;
|
101 |
-
$do_encrypt = $force_encrypt || $this->_args['encrypt_id'];
|
102 |
-
if( $do_encrypt && is_callable( array( 'GFCommon', 'encrypt' ) ) ) {
|
103 |
-
$id = rawurlencode( GFCommon::encrypt( $id ) );
|
104 |
-
}
|
105 |
-
return $id;
|
106 |
-
}
|
107 |
-
function get_entry() {
|
108 |
-
if( ! self::$_entry ) {
|
109 |
-
$entry_id = $this->get_entry_id();
|
110 |
-
if( ! $entry_id )
|
111 |
-
return false;
|
112 |
-
$entry = GFFormsModel::get_lead( $entry_id );
|
113 |
-
if( empty( $entry ) )
|
114 |
-
return false;
|
115 |
-
self::$_entry = $entry;
|
116 |
-
}
|
117 |
-
return self::$_entry;
|
118 |
-
}
|
119 |
-
function get_entry_id() {
|
120 |
-
$entry_id = rgget( 'id' );
|
121 |
-
if( $entry_id ) {
|
122 |
-
return $this->maybe_decrypt_entry_id( $entry_id );
|
123 |
-
}
|
124 |
-
$post = get_post();
|
125 |
-
if( $post ) {
|
126 |
-
$entry_id = get_post_meta( $post->ID, '_gform-entry-id', true );
|
127 |
-
}
|
128 |
-
return $entry_id ? $entry_id : false;
|
129 |
-
}
|
130 |
-
function maybe_decrypt_entry_id( $entry_id ) {
|
131 |
-
$do_encrypt = $this->_args['encrypt_id'];
|
132 |
-
if( ! $entry_id ) {
|
133 |
-
return null;
|
134 |
-
} else if( ! $do_encrypt && is_numeric( $entry_id ) && intval( $entry_id ) > 0 ) {
|
135 |
-
return $entry_id;
|
136 |
-
} else {
|
137 |
-
$entry_id = is_callable( array( 'GFCommon', 'decrypt' ) ) ? GFCommon::decrypt( $entry_id ) : $entry_id;
|
138 |
-
return intval( $entry_id );
|
139 |
-
}
|
140 |
-
}
|
141 |
-
function is_auto_id_enabled( $form ) {
|
142 |
-
$auto_append_id = $this->_args['auto_append_id'];
|
143 |
-
if( is_bool( $auto_append_id ) && $auto_append_id === true )
|
144 |
-
return true;
|
145 |
-
if( is_array( $auto_append_id ) && in_array( $form['id'], $auto_append_id ) )
|
146 |
-
return true;
|
147 |
-
return false;
|
148 |
-
}
|
149 |
-
}
|
150 |
-
function persiangravityforms_post_content_merge_tags( $args = array() ) {
|
151 |
-
return PersianGravityForms_Post_Content_Merge_Tags::get_instance( $args );
|
152 |
-
}
|
153 |
-
persiangravityforms_post_content_merge_tags();
|
154 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/Snippets.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Post Permalink Merge Tag
|
4 |
-
* http://GravityForms.ir
|
5 |
-
*/
|
6 |
-
class GFIR_PostPermalink {
|
7 |
-
function __construct() {
|
8 |
-
add_filter('gform_custom_merge_tags', array($this, 'add_custom_merge_tag'), 10, 4);
|
9 |
-
add_filter('gform_replace_merge_tags', array($this, 'replace_merge_tag'), 10, 3);
|
10 |
-
}
|
11 |
-
function add_custom_merge_tag($merge_tags, $form_id, $fields, $element_id) {
|
12 |
-
if(!GFCommon::has_post_field($fields))
|
13 |
-
return $merge_tags;
|
14 |
-
$merge_tags[] = array('label' => 'لینک پست', 'tag' => '{post_permalink}');
|
15 |
-
return $merge_tags;
|
16 |
-
}
|
17 |
-
function replace_merge_tag($text, $form, $entry) {
|
18 |
-
$custom_merge_tag = '{post_permalink}';
|
19 |
-
if(strpos($text, $custom_merge_tag) === false || !rgar($entry, 'post_id'))
|
20 |
-
return $text;
|
21 |
-
$post_permalink = get_permalink(rgar($entry, 'post_id'));
|
22 |
-
$text = str_replace($custom_merge_tag, $post_permalink, $text);
|
23 |
-
return $text;
|
24 |
-
}
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include/wp-session.php
DELETED
@@ -1,232 +0,0 @@
|
|
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 |
-
$this->read_data();
|
81 |
-
$this->set_cookie();
|
82 |
-
}
|
83 |
-
protected function set_expiration() {
|
84 |
-
$this->exp_variant = time() + (int) apply_filters( 'wp_session_expiration_variant', 24 * 60 );
|
85 |
-
$this->expires = time() + (int) apply_filters( 'wp_session_expiration', 30 * 60 );
|
86 |
-
}
|
87 |
-
protected function set_cookie(){
|
88 |
-
if( !headers_sent() )
|
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 |
-
return $wp_session->json_in( $data );
|
168 |
-
}
|
169 |
-
function wp_session_encode() {
|
170 |
-
$wp_session = WP_Session::get_instance();
|
171 |
-
return $wp_session->json_out();
|
172 |
-
}
|
173 |
-
function wp_session_regenerate_id( $delete_old_session = false ) {
|
174 |
-
$wp_session = WP_Session::get_instance();
|
175 |
-
$wp_session->regenerate_id( $delete_old_session );
|
176 |
-
return true;
|
177 |
-
}
|
178 |
-
function wp_session_start() {
|
179 |
-
$wp_session = WP_Session::get_instance();
|
180 |
-
do_action( 'wp_session_start' );
|
181 |
-
return $wp_session->session_started();
|
182 |
-
}
|
183 |
-
add_action( 'plugins_loaded', 'wp_session_start' );
|
184 |
-
function wp_session_status() {
|
185 |
-
$wp_session = WP_Session::get_instance();
|
186 |
-
if ( $wp_session->session_started() ) {
|
187 |
-
return PHP_SESSION_ACTIVE;
|
188 |
-
}
|
189 |
-
return PHP_SESSION_NONE;
|
190 |
-
}
|
191 |
-
function wp_session_unset() {
|
192 |
-
$wp_session = WP_Session::get_instance();
|
193 |
-
$wp_session->reset();
|
194 |
-
}
|
195 |
-
function wp_session_write_close() {
|
196 |
-
$wp_session = WP_Session::get_instance();
|
197 |
-
$wp_session->write_data();
|
198 |
-
do_action( 'wp_session_commit' );
|
199 |
-
}
|
200 |
-
add_action( 'shutdown', 'wp_session_write_close' );
|
201 |
-
function wp_session_cleanup() {
|
202 |
-
global $wpdb;
|
203 |
-
if ( defined( 'WP_SETUP_CONFIG' ) ) {
|
204 |
-
return;
|
205 |
-
}
|
206 |
-
if ( ! defined( 'WP_INSTALLING' ) ) {
|
207 |
-
$expiration_keys = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE '_wp_session_expires_%'" );
|
208 |
-
$now = time();
|
209 |
-
$expired_sessions = array();
|
210 |
-
foreach( $expiration_keys as $expiration ) {
|
211 |
-
if ( $now > intval( $expiration->option_value ) ) {
|
212 |
-
$session_id = substr( $expiration->option_name, 20 );
|
213 |
-
$expired_sessions[] = $expiration->option_name;
|
214 |
-
$expired_sessions[] = "_wp_session_$session_id";
|
215 |
-
}
|
216 |
-
}
|
217 |
-
if ( ! empty( $expired_sessions ) ) {
|
218 |
-
$option_names = implode( "','", $expired_sessions );
|
219 |
-
$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name IN ('$option_names')" );
|
220 |
-
}
|
221 |
-
}
|
222 |
-
do_action( 'wp_session_cleanup' );
|
223 |
-
}
|
224 |
-
add_action( 'wp_session_garbage_collection', 'wp_session_cleanup' );
|
225 |
-
function wp_session_register_garbage_collection() {
|
226 |
-
if ( !wp_next_scheduled( 'wp_session_garbage_collection' ) ) {
|
227 |
-
wp_schedule_event( time(), 'hourly', 'wp_session_garbage_collection' );
|
228 |
-
}
|
229 |
-
}
|
230 |
-
add_action( 'wp', 'wp_session_register_garbage_collection' );
|
231 |
-
}
|
232 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-iran-cities.php
ADDED
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined('ABSPATH') ) exit;
|
2 |
+
|
3 |
+
class GFParsi_IranCities {
|
4 |
+
|
5 |
+
public $province = array();
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
|
9 |
+
add_filter('gform_address_types' , array( $this, 'iran_address' ) );
|
10 |
+
add_filter('gform_predefined_choices' , array( $this, 'predefined_choices' ),1);
|
11 |
+
|
12 |
+
add_filter('gform_field_content' , array( $this, 'city_select'), 10, 5);
|
13 |
+
|
14 |
+
add_action('gform_register_init_scripts' , array( $this, 'init_script') , 10 ,1 );
|
15 |
+
add_action('gform_enqueue_scripts' , array( $this, 'external_js') , 10 , 2 );
|
16 |
+
|
17 |
+
add_filter('gform_tooltips' , array( $this, 'tooltips'));
|
18 |
+
add_action('gform_editor_js' , array( $this, 'iran_cities'));
|
19 |
+
add_action('gform_field_standard_settings' , array( $this, 'iran_cities_option'), 10, 2);
|
20 |
+
}
|
21 |
+
|
22 |
+
public function tooltips( $tooltips ) {
|
23 |
+
$tooltips['gform_activate_iran_cities'] = __('<h6>فعالسازی شهر های ایرانی</h6>برای فعالسازی انتخابگر لیست شهر های ایران می بایست نوع آدرس بر روی "ایران" باشد.', 'GF_FA');
|
24 |
+
return $tooltips;
|
25 |
+
}
|
26 |
+
|
27 |
+
public function get_province() {
|
28 |
+
|
29 |
+
$this->province = array(
|
30 |
+
__( 'Azarbaijan - East' , 'GF_FA' ),
|
31 |
+
__( 'Azarbaijan - West' , 'GF_FA' ),
|
32 |
+
__( 'Ardabil' , 'GF_FA' ),
|
33 |
+
__( 'Isfahan' , 'GF_FA' ),
|
34 |
+
__( 'Alborz' , 'GF_FA' ),
|
35 |
+
__( 'Ilam' , 'GF_FA' ),
|
36 |
+
__( 'Bushehr' , 'GF_FA' ),
|
37 |
+
__( 'Tehran' , 'GF_FA' ),
|
38 |
+
__( 'Chahar Mahaal and Bakhtiari', 'GF_FA' ),
|
39 |
+
__( 'Khorasan - South' , 'GF_FA' ),
|
40 |
+
__( 'Khorasan - Razavi' , 'GF_FA' ),
|
41 |
+
__( 'Khorasan - North' , 'GF_FA' ),
|
42 |
+
__( 'Khuzestan' , 'GF_FA' ),
|
43 |
+
__( 'Zanjan' , 'GF_FA' ),
|
44 |
+
__( 'Semnan' , 'GF_FA' ),
|
45 |
+
__( 'Sistan and Baluchistan', 'GF_FA' ),
|
46 |
+
__( 'Fars' , 'GF_FA' ),
|
47 |
+
__( 'Qazvin' , 'GF_FA' ),
|
48 |
+
__( 'Qom' , 'GF_FA' ),
|
49 |
+
__( 'Kurdistan' , 'GF_FA' ),
|
50 |
+
__( 'Kerman' , 'GF_FA' ),
|
51 |
+
__( 'Kermanshah' , 'GF_FA' ),
|
52 |
+
__( 'Kohgiluyeh and Boyer-Ahmad', 'GF_FA' ),
|
53 |
+
__( 'Golestan' , 'GF_FA' ),
|
54 |
+
__( 'Guilan' , 'GF_FA' ),
|
55 |
+
__( 'Lorestan' , 'GF_FA' ),
|
56 |
+
__( 'Mazandaran' , 'GF_FA' ),
|
57 |
+
__( 'Markazi' , 'GF_FA' ),
|
58 |
+
__( 'Hormozgān' , 'GF_FA' ),
|
59 |
+
__( 'Hamadan' , 'GF_FA' ),
|
60 |
+
__( 'Yazd' , 'GF_FA' )
|
61 |
+
);
|
62 |
+
}
|
63 |
+
|
64 |
+
public function iran_address( $address_types ) {
|
65 |
+
$this->get_province();
|
66 |
+
$address_types['iran'] = array(
|
67 |
+
'label' => __( 'Iran', 'GF_FA' ),
|
68 |
+
'country' => __( 'Iran', 'GF_FA' ),
|
69 |
+
'zip_label' => __( 'Postal Code', 'GF_FA' ),
|
70 |
+
'state_label' => __( 'Province', 'GF_FA' ),
|
71 |
+
'states' => array_merge( array('') , $this->province )
|
72 |
+
);
|
73 |
+
return $address_types;
|
74 |
+
}
|
75 |
+
|
76 |
+
public function predefined_choices($choices){
|
77 |
+
$this->get_province();
|
78 |
+
$states[__( 'Provinces of Iran', 'GF_FA' )] = $this->province;
|
79 |
+
return $choices = array_merge( $states, $choices);
|
80 |
+
}
|
81 |
+
|
82 |
+
public function iran_cities(){ ?>
|
83 |
+
|
84 |
+
<script type='text/javascript'>
|
85 |
+
fieldSettings["address"] += ", .iran_cities";
|
86 |
+
jQuery(document).bind("gform_load_field_settings", function(event, field, form){
|
87 |
+
jQuery("#iran_cities").attr("checked", field["iran_cities"] == true);
|
88 |
+
});
|
89 |
+
</script>
|
90 |
+
|
91 |
+
<?php
|
92 |
+
}
|
93 |
+
|
94 |
+
public function iran_cities_option( $position, $form_id ){
|
95 |
+
|
96 |
+
if( $position == 25 ) { ?>
|
97 |
+
|
98 |
+
<li class="iran_cities field_setting">
|
99 |
+
<input type="checkbox" id="iran_cities" onclick="SetFieldProperty('iran_cities', jQuery(this).is(':checked') ? 1 : 0);"/>
|
100 |
+
<label class="inline gfield_value_label" for="iran_cities" class="inline">
|
101 |
+
<?php _e( 'Activate Iran Cities', 'GF_FA' ); ?>
|
102 |
+
<?php gform_tooltip("gform_activate_iran_cities") ?>
|
103 |
+
</label>
|
104 |
+
</li>
|
105 |
+
|
106 |
+
<?php
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
public function city_select( $content, $field, $value, $lead_id, $form_id ){
|
111 |
+
|
112 |
+
if ( $field['type'] == 'address' && $field['addressType'] == 'iran' && rgget("iran_cities", $field) && ! is_admin() ) {
|
113 |
+
|
114 |
+
$id = $field['id'];
|
115 |
+
|
116 |
+
preg_match( "/<input type='text' name='input_{$id}.3'(.*?)\/>/", $content, $match );
|
117 |
+
|
118 |
+
if ( !empty($match[0]) && !empty($match[1]) ) {
|
119 |
+
$city_input = str_replace( "value=''" , "", $match[1]);
|
120 |
+
$content = str_replace( $match[0] , "<select name='input_{$id}.3' {$city_input} ><option value='' selected='selected'> </option></select>", $content );
|
121 |
+
return $content;
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
return $content;
|
126 |
+
}
|
127 |
+
|
128 |
+
public function external_js( $form , $ajax ) {
|
129 |
+
|
130 |
+
$fields = GFCommon::get_fields_by_type( $form, array( 'address' ) );
|
131 |
+
|
132 |
+
foreach ( (array) $fields as $field ) {
|
133 |
+
|
134 |
+
if ( $field['type'] == 'address' && $field['addressType'] == 'iran' && rgget("iran_cities", $field) && ! is_admin() ) {
|
135 |
+
|
136 |
+
wp_dequeue_script('gform_iran_citeis');
|
137 |
+
wp_deregister_script('gform_iran_citeis');
|
138 |
+
|
139 |
+
wp_register_script( 'gform_iran_citeis', GF_PARSI_URL . 'assets/js/iran-cities.min.js', array() , GF_PARSI_VERSION, false );
|
140 |
+
wp_enqueue_script( 'gform_iran_citeis' );
|
141 |
+
}
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
public function init_script( $form ) {
|
146 |
+
|
147 |
+
foreach( $form['fields'] as &$field ) {
|
148 |
+
|
149 |
+
if ( $field['type'] == 'address' && $field['addressType'] == 'iran' && rgget("iran_cities", $field) && ! is_admin() ) {
|
150 |
+
|
151 |
+
$field_id = $field['id'];
|
152 |
+
$form_id = $form['id'];
|
153 |
+
$id = $form_id . '_'. $field_id;
|
154 |
+
|
155 |
+
$script = '(function($){' .
|
156 |
+
'$(".ginput_container_address #input_' . $id . '_4").each(function(){' .
|
157 |
+
'$(".ginput_container_address #input_' . $id . '_3").empty();' .
|
158 |
+
'$(".ginput_container_address #input_' . $id . '_3").append(gform_iranCities($(".ginput_container_address #input_' . $id . '_4").val()));' .
|
159 |
+
'}).change(function(){' .
|
160 |
+
'$(".ginput_container_address #input_' . $id . '_3").empty();' .
|
161 |
+
'$(".ginput_container_address #input_' . $id . '_3").append(gform_iranCities($(".ginput_container_address #input_' . $id . '_4").val()));' .
|
162 |
+
'});' .
|
163 |
+
'})(jQuery);';
|
164 |
+
|
165 |
+
GFFormDisplay::add_init_script( $form['id'], 'iran_address_city_' . $id, GFFormDisplay::ON_PAGE_RENDER, $script );
|
166 |
+
|
167 |
+
}
|
168 |
+
}
|
169 |
+
}
|
170 |
+
|
171 |
+
}
|
172 |
+
|
173 |
+
new GFParsi_IranCities();
|
includes/class-jalali-date.php
ADDED
@@ -0,0 +1,282 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined('ABSPATH') ) exit;
|
2 |
+
|
3 |
+
class GFParsi_JalaliDate {
|
4 |
+
|
5 |
+
public function __construct() {
|
6 |
+
|
7 |
+
require_once( GF_PARSI_DIR . '/lib/jdf.php');
|
8 |
+
|
9 |
+
add_action('gform_field_standard_settings' , array( $this, 'jalali_checkbox'), 10, 2);
|
10 |
+
add_action('gform_editor_js' , array( $this, 'jalali_settings'));
|
11 |
+
add_filter('gform_field_validation' , array( $this, 'jalali_validator'), 10, 4);
|
12 |
+
add_filter('gform_tooltips' , array( $this, 'tooltips'));
|
13 |
+
add_filter('gform_date_min_year' , array( $this, 'jalali_date_min' ), 10, 3);
|
14 |
+
add_filter('gform_date_max_year' , array( $this, 'jalali_date_max' ), 10, 3);
|
15 |
+
add_action('gform_enqueue_scripts' , array( $this, 'add_datepicker_jalali' ), 11, 1 );
|
16 |
+
|
17 |
+
// add_action('admin_enqueue_scripts' , array( $this, 'admin_scripts' ));
|
18 |
+
// add_action('admin_head' , array( $this, 'admin_head' ));
|
19 |
+
|
20 |
+
}
|
21 |
+
|
22 |
+
public function tooltips( $tooltips ) {
|
23 |
+
$tooltips["gform_activate_jalali"] = __('<h6>فعالسازی تاریخ شمسی</h6>در صورتی که از چند فیلد تاریخ استفاده میکنید ، فعالسازی تاریخ شمسی یکی از فیلدها کفایت میکند .<br/>تذکر : با توجه به آزمایشی بودن این قسمت ممکن است تداخل توابع سبب ناسازگاری با برخی قالب ها شود.', 'GF_FA');
|
24 |
+
return $tooltips;
|
25 |
+
}
|
26 |
+
|
27 |
+
public function jalali_settings(){ ?>
|
28 |
+
<script type='text/javascript'>
|
29 |
+
fieldSettings["date"] += ", .jalali_setting";
|
30 |
+
jQuery(document).bind("gform_load_field_settings", function(event, field, form){
|
31 |
+
jQuery("#check_jalali").attr("checked", field["check_jalali"] == true);
|
32 |
+
});
|
33 |
+
</script>
|
34 |
+
<?php
|
35 |
+
}
|
36 |
+
|
37 |
+
public function jalali_checkbox( $position, $form_id ){
|
38 |
+
if( $position == 25 ) { ?>
|
39 |
+
<li class="jalali_setting field_setting">
|
40 |
+
<input type="checkbox" id="check_jalali" onclick="SetFieldProperty('check_jalali', jQuery(this).is(':checked') ? 1 : 0);"/>
|
41 |
+
<label class="inline gfield_value_label" for="check_jalali" class="inline">
|
42 |
+
<?php _e( 'Activate Jalali date', 'GF_FA' ); ?>
|
43 |
+
<?php gform_tooltip("gform_activate_jalali") ?>
|
44 |
+
</label>
|
45 |
+
</li>
|
46 |
+
<?php
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
public function add_datepicker_jalali( $form ) {
|
51 |
+
|
52 |
+
if ( !is_admin() && ( wp_script_is( 'gform_datepicker_init' ) || wp_script_is( 'gform_datepicker_init', 'registered' ) ) ) {
|
53 |
+
|
54 |
+
$is_jalali = false;
|
55 |
+
|
56 |
+
foreach ( $form['fields'] as $field ) {
|
57 |
+
|
58 |
+
if ( $field['type'] == 'date' && rgget( 'check_jalali', $field ) ) {
|
59 |
+
$is_jalali = true;
|
60 |
+
break;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
if ( $is_jalali ) {
|
65 |
+
|
66 |
+
wp_dequeue_script('jquery-ui-datepicker');
|
67 |
+
wp_deregister_script('jquery-ui-datepicker');
|
68 |
+
|
69 |
+
wp_register_script('jquery-ui-datepicker', GF_PARSI_URL . 'assets/js/jalali.date.picker.js', array( 'jquery', 'jquery-migrate', 'jquery-ui-core', 'gform_gravityforms' ), GF_PARSI_VERSION, true );
|
70 |
+
wp_enqueue_script( 'jquery-ui-datepicker' );
|
71 |
+
}
|
72 |
+
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
public function admin_head() {
|
77 |
+
?>
|
78 |
+
<script type="text/javascript">
|
79 |
+
jQuery(document).ready(function ($) {
|
80 |
+
|
81 |
+
jQuery('.datepicker').datepicker({
|
82 |
+
showOn: 'both',
|
83 |
+
buttonImage: "<?php echo GFCommon::get_base_url() ?>/images/calendar.png",
|
84 |
+
buttonImageOnly: true,
|
85 |
+
changeMonth: true,
|
86 |
+
changeYear: true,
|
87 |
+
showButtonPanel: true,
|
88 |
+
onSelect: function(dateStr, inst) {
|
89 |
+
var selectedJalaliDate = new JalaliDate(inst.selectedYear, inst.selectedMonth, inst.selectedDay);
|
90 |
+
var date = selectedJalaliDate.getGregorianDate();
|
91 |
+
var month= date.getMonth()+1;
|
92 |
+
var day = date.getDate() < 10 ? '0'+date.getDate() : date.getDate();
|
93 |
+
var months = date.getMonth() < 9 ? '0'+month : month;
|
94 |
+
$(this).val(months + '/' + day + '/' + date.getFullYear());
|
95 |
+
}
|
96 |
+
});
|
97 |
+
|
98 |
+
jQuery('#export_date_start').datepicker({
|
99 |
+
changeMonth: true,
|
100 |
+
changeYear: true,
|
101 |
+
showButtonPanel: true,
|
102 |
+
onSelect: function(dateStr, inst) {
|
103 |
+
var selectedJalaliDate = new JalaliDate(inst.selectedYear, inst.selectedMonth, inst.selectedDay);
|
104 |
+
var date = selectedJalaliDate.getGregorianDate();
|
105 |
+
var month= date.getMonth()+1;
|
106 |
+
var day = date.getDate() < 10 ? '0'+date.getDate() : date.getDate();
|
107 |
+
var months = date.getMonth() < 9 ? '0'+month : month;
|
108 |
+
$(this).val(date.getFullYear() + '-' + months + '-' + day);
|
109 |
+
}
|
110 |
+
});
|
111 |
+
|
112 |
+
jQuery('#export_date_end').datepicker({
|
113 |
+
changeMonth: true,
|
114 |
+
changeYear: true,
|
115 |
+
showButtonPanel: true,
|
116 |
+
onSelect: function(dateStr, inst) {
|
117 |
+
var selectedJalaliDate = new JalaliDate(inst.selectedYear, inst.selectedMonth, inst.selectedDay);
|
118 |
+
var date = selectedJalaliDate.getGregorianDate();
|
119 |
+
var month= date.getMonth()+1;
|
120 |
+
var day = date.getDate() < 10 ? '0'+date.getDate() : date.getDate();
|
121 |
+
var months = date.getMonth() < 9 ? '0'+month : month;
|
122 |
+
$(this).val(date.getFullYear() + '-' + months + '-' + day);
|
123 |
+
}
|
124 |
+
});
|
125 |
+
|
126 |
+
});
|
127 |
+
|
128 |
+
</script>
|
129 |
+
<?php
|
130 |
+
}
|
131 |
+
|
132 |
+
public function admin_scripts() {
|
133 |
+
|
134 |
+
if ( $this->is_gravity_page() && ( wp_script_is( 'jquery-ui-datepicker' ) || wp_script_is( 'jquery-ui-datepicker', 'registered' ) ) ) {
|
135 |
+
|
136 |
+
wp_dequeue_script('jquery-ui-datepicker');
|
137 |
+
wp_deregister_script('jquery-ui-datepicker');
|
138 |
+
|
139 |
+
if ( ! wp_script_is( 'jquery-ui-core' ))
|
140 |
+
wp_enqueue_script('jquery-ui-core');
|
141 |
+
|
142 |
+
wp_register_script('gform_datepicker_jalali_admin', GF_PARSI_URL . 'assets/js/jalali.date.picker.js', array( 'jquery', 'jquery-ui-core' ), GF_PARSI_VERSION, true );
|
143 |
+
wp_enqueue_script( 'gform_datepicker_jalali_admin' );
|
144 |
+
}
|
145 |
+
}
|
146 |
+
|
147 |
+
public function jalali_date_min( $min_year, $form, $field ){
|
148 |
+
|
149 |
+
if ( $field->type == 'date' && !empty($field->check_jalali) ) {
|
150 |
+
$min_year = GF_gregorian_to_jalali($min_year,03,21);
|
151 |
+
$min_year = $min_year[0]+1;
|
152 |
+
}
|
153 |
+
|
154 |
+
return apply_filters( 'jalali_date_min', $min_year, $form, $field );
|
155 |
+
}
|
156 |
+
|
157 |
+
public function jalali_date_max($max_year, $form, $field ){
|
158 |
+
|
159 |
+
if ( $field->type == 'date' && !empty($field->check_jalali) ) {
|
160 |
+
$max_year = GF_gregorian_to_jalali($max_year,03,21);
|
161 |
+
$max_year = $max_year[0]+20;
|
162 |
+
}
|
163 |
+
|
164 |
+
return apply_filters( 'jalali_date_max', $max_year, $form, $field );
|
165 |
+
}
|
166 |
+
|
167 |
+
public function jalali_validator($result, $value, $form, $field){
|
168 |
+
|
169 |
+
if ( $field["type"] == "date" ) {
|
170 |
+
|
171 |
+
if ( rgget("check_jalali", $field) ) {
|
172 |
+
|
173 |
+
if( is_array($value) && rgempty(0, $value) && rgempty(1, $value)&& rgempty(2, $value))
|
174 |
+
$value = null;
|
175 |
+
|
176 |
+
if( !empty($value) ) {
|
177 |
+
|
178 |
+
$format = empty($field["dateFormat"]) ? "mdy" : $field["dateFormat"];
|
179 |
+
$date = GFCommon::parse_date($value, $format);
|
180 |
+
|
181 |
+
if (!empty($date) ){
|
182 |
+
|
183 |
+
if ( intval($date["month"]) >= 1 && intval($date["month"]) <=12 ) {
|
184 |
+
|
185 |
+
$min = 1;
|
186 |
+
if ( intval($date["month"]) >= 1 && intval($date["month"]) <=6 )
|
187 |
+
$max = 31;
|
188 |
+
|
189 |
+
if ( intval($date["month"]) >= 7 && intval($date["month"]) <=12 )
|
190 |
+
$max = 30;
|
191 |
+
|
192 |
+
if ( intval($date["month"]) == 12 && intval($date["day"]) >= 1 && intval($date["day"]) <= 30 ) {
|
193 |
+
$gregorian = GF_jalali_to_gregorian($date["year"],$date["month"],$date["day"]);
|
194 |
+
$day = $gregorian[2];
|
195 |
+
$month = $gregorian[1];
|
196 |
+
$year = $gregorian[0];
|
197 |
+
$target = new DateTime("$year-$month-$day 09:00:00");
|
198 |
+
$target = $target->format('Y-m-d H:i:s');
|
199 |
+
$target = strtotime ($target);
|
200 |
+
$leap_year = GF_jdate('L',$target,'','','en');
|
201 |
+
if ( $leap_year != 1 )
|
202 |
+
$max = 29;
|
203 |
+
}
|
204 |
+
|
205 |
+
if ( intval($date["day"]) >= $min && intval($date["day"]) <= $max ) {
|
206 |
+
$gregorian = GF_jalali_to_gregorian($date["year"],$date["month"],$date["day"]);
|
207 |
+
$day = $gregorian[2];
|
208 |
+
$month = $gregorian[1];
|
209 |
+
$year = $gregorian[0];
|
210 |
+
$result["is_valid"] = $this->jalali_checkdate($month, $day, $year);
|
211 |
+
}
|
212 |
+
else
|
213 |
+
$result["is_valid"] = false;
|
214 |
+
|
215 |
+
}
|
216 |
+
else
|
217 |
+
$result["is_valid"] = false;
|
218 |
+
}
|
219 |
+
else
|
220 |
+
$result["is_valid"] = false;
|
221 |
+
|
222 |
+
if( empty($date) || !$result["is_valid"] ) {
|
223 |
+
|
224 |
+
$format_name = '';
|
225 |
+
switch($format) {
|
226 |
+
|
227 |
+
case "mdy" :
|
228 |
+
$format_name = "mm/dd/yyyy";
|
229 |
+
break;
|
230 |
+
|
231 |
+
case "dmy" :
|
232 |
+
$format_name = "dd/mm/yyyy";
|
233 |
+
break;
|
234 |
+
case "dmy_dash" :
|
235 |
+
$format_name = "dd-mm-yyyy";
|
236 |
+
break;
|
237 |
+
case "dmy_dot" :
|
238 |
+
$format_name = "dd.mm.yyyy";
|
239 |
+
break;
|
240 |
+
|
241 |
+
case "ymd_slash" :
|
242 |
+
$format_name = "yyyy/mm/dd";
|
243 |
+
break;
|
244 |
+
|
245 |
+
case "ymd_dash" :
|
246 |
+
$format_name = "yyyy-mm-dd";
|
247 |
+
break;
|
248 |
+
case "ymd_dot" :
|
249 |
+
$format_name = "yyyy.mm.dd";
|
250 |
+
break;
|
251 |
+
}
|
252 |
+
|
253 |
+
$result["is_valid"] = false;
|
254 |
+
$message = $field["dateType"] == "datepicker" ? sprintf(__("Please enter a valid date in the format (%s).", "gravityforms"), $format_name) : __("Please enter a valid date.", "gravityforms");
|
255 |
+
$result["message"] = empty($field["errorMessage"]) ? $message : $field["errorMessage"];
|
256 |
+
}
|
257 |
+
else
|
258 |
+
$result["is_valid"] = true;
|
259 |
+
}
|
260 |
+
}
|
261 |
+
}
|
262 |
+
|
263 |
+
return $result;
|
264 |
+
}
|
265 |
+
|
266 |
+
public function jalali_checkdate($month, $day, $year){
|
267 |
+
if( empty($month) || !is_numeric($month) || empty($day) || !is_numeric($day) || empty($year) || !is_numeric($year) || strlen($year) != 4 )
|
268 |
+
return false;
|
269 |
+
return checkdate($month, $day, $year);
|
270 |
+
}
|
271 |
+
|
272 |
+
public function is_gravity_page() {
|
273 |
+
|
274 |
+
if ( !class_exists('RGForms') )
|
275 |
+
return false;
|
276 |
+
|
277 |
+
$current_page = trim(strtolower(RGForms::get("page")));
|
278 |
+
return ( substr( $current_page , 0 , 2) == 'gf' || stripos( $current_page, 'gravity' ) !== false );
|
279 |
+
}
|
280 |
+
}
|
281 |
+
|
282 |
+
new GFParsi_JalaliDate();
|
includes/class-live-preview.php
ADDED
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined('ABSPATH') ) exit;
|
2 |
+
|
3 |
+
class GFParsi_LivePreview {
|
4 |
+
|
5 |
+
var $post_type = 'gf_live_preview';
|
6 |
+
|
7 |
+
public function __construct( $args = array() ) {
|
8 |
+
|
9 |
+
if( ! property_exists( 'GFCommon', 'version' ) || ! version_compare( GFCommon::$version, '1.8', '>=' ) )
|
10 |
+
return;
|
11 |
+
|
12 |
+
$this->_args = wp_parse_args( $args, array(
|
13 |
+
'id' => 0,
|
14 |
+
'title' => true,
|
15 |
+
'description' => true,
|
16 |
+
'ajax' => true
|
17 |
+
) );
|
18 |
+
|
19 |
+
add_action( 'init', array( $this, 'register_preview_post_type' ) );
|
20 |
+
add_action( 'wp', array( $this, 'maybe_load_preview_functionality' ) );
|
21 |
+
add_action( 'admin_footer', array( $this, 'display_preview_link' ) );
|
22 |
+
|
23 |
+
add_action( 'admin_footer', array( $this, 'display_preview_link' ) );
|
24 |
+
add_filter( 'gform_form_actions', array( $this, 'gform_form_actions' ), 10, 2 );
|
25 |
+
}
|
26 |
+
|
27 |
+
public function register_preview_post_type() {
|
28 |
+
|
29 |
+
$args = array(
|
30 |
+
'label' => __( 'Form Preview', 'GF_FA' ),
|
31 |
+
'description' => __( 'A post type created for previewing Gravity Forms forms on the frontend.', 'GF_FA' ),
|
32 |
+
'public' => false,
|
33 |
+
'publicly_queryable' => true,
|
34 |
+
'has_archive' => true,
|
35 |
+
'can_export' => false,
|
36 |
+
'supports' => false
|
37 |
+
);
|
38 |
+
|
39 |
+
register_post_type( $this->post_type, $args );
|
40 |
+
|
41 |
+
// create preview post
|
42 |
+
$preview_post = get_posts( array( 'post_type' => $this->post_type ) );
|
43 |
+
if( empty( $preview_post ) ) {
|
44 |
+
$post_id = wp_insert_post( array(
|
45 |
+
'post_type' => $this->post_type,
|
46 |
+
'post_title' => __( 'Form Preview', 'GF_FA' ),
|
47 |
+
'post_status' => 'publish'
|
48 |
+
) );
|
49 |
+
}
|
50 |
+
|
51 |
+
}
|
52 |
+
|
53 |
+
public function maybe_load_preview_functionality() {
|
54 |
+
global $wp_query;
|
55 |
+
|
56 |
+
if( ! $this->is_live_preview() )
|
57 |
+
return;
|
58 |
+
|
59 |
+
$this->live_preview_hooks();
|
60 |
+
|
61 |
+
// quick hack for GF to ensure scripts/styles are loaded correctly
|
62 |
+
foreach( $wp_query->posts as &$post ) {
|
63 |
+
$post->post_content = $this->get_shortcode();
|
64 |
+
}
|
65 |
+
|
66 |
+
}
|
67 |
+
|
68 |
+
public function live_preview_hooks() {
|
69 |
+
|
70 |
+
add_filter( 'template_include', array( $this, 'load_preview_template' ) );
|
71 |
+
add_filter( 'the_content', array( $this, 'modify_preview_post_content' ) );
|
72 |
+
|
73 |
+
}
|
74 |
+
|
75 |
+
public function gform_form_actions( $form_actions , $form_id ) {
|
76 |
+
|
77 |
+
|
78 |
+
if ( !empty($_GET['trash']) && $_GET['trash'] == 1 )
|
79 |
+
return $form_actions;
|
80 |
+
|
81 |
+
$capabilities = array( 'gravityforms_view_entries', 'gravityforms_edit_entries', 'gravityforms_delete_entries' );
|
82 |
+
|
83 |
+
$ajax_true_url = get_bloginfo("wpurl") . '/?post_type='.$this->post_type.'&id=' . $form_id;
|
84 |
+
$ajax_false_url = get_bloginfo("wpurl") . '/?post_type='.$this->post_type.'&ajax=false&id=' . $form_id;
|
85 |
+
|
86 |
+
$sub_menu_items = array();
|
87 |
+
|
88 |
+
$sub_menu_items[] = array(
|
89 |
+
'url' => $ajax_true_url,
|
90 |
+
'label' => __( 'Ajax option enabled' , 'GF_FA'),
|
91 |
+
'capabilities' => $capabilities
|
92 |
+
);
|
93 |
+
|
94 |
+
$sub_menu_items[] = array(
|
95 |
+
'url' => $ajax_false_url,
|
96 |
+
'label' => __( 'Ajax option disabled' , 'GF_FA'),
|
97 |
+
'capabilities' => $capabilities
|
98 |
+
);
|
99 |
+
|
100 |
+
$form_actions['live_preview'] = array(
|
101 |
+
'label' => __( 'Live Preview', 'GF_FA' ),
|
102 |
+
'icon' => '<i class="fa fa-cogs fa-lg"></i>',
|
103 |
+
'title' => __( 'Live Preview', 'GF_FA' ),
|
104 |
+
'url' => '',
|
105 |
+
'menu_class' => 'gf_form_toolbar_settings',
|
106 |
+
'link_class' => 'gf_toolbar_active',
|
107 |
+
'sub_menu_items' => $sub_menu_items,
|
108 |
+
'capabilities' => $capabilities,
|
109 |
+
'priority' => 650,
|
110 |
+
);
|
111 |
+
|
112 |
+
return $form_actions;
|
113 |
+
}
|
114 |
+
|
115 |
+
public function display_preview_link() {
|
116 |
+
|
117 |
+
if( ! $this->is_applicable_page() || apply_filters( 'gf_live_preview_page' , false) )
|
118 |
+
return;
|
119 |
+
|
120 |
+
$form_id = apply_filters( 'gf_live_preview_id' , rgget( 'id' ) );
|
121 |
+
$ajax_true_url = get_bloginfo("wpurl") . '/?post_type='.$this->post_type.'&id=' . $form_id;
|
122 |
+
$ajax_false_url = get_bloginfo("wpurl") . '/?post_type='.$this->post_type.'&ajax=false&id=' . $form_id;
|
123 |
+
?>
|
124 |
+
|
125 |
+
<script type="text/javascript">
|
126 |
+
(function($){
|
127 |
+
$( '<li class="gf_form_toolbar_preview">'+
|
128 |
+
'<a style="position:relative" id="gf-live-preview" onclick="" class="" >' +
|
129 |
+
'<i class="fa fa-eye" style="position: absolute; text-shadow: 0px 0px 5px rgb(255, 255, 255); z-index: 99; line-height: 7px; left: 0px font-size: 9px; top: 6px; background-color: rgb(243, 243, 243);"></i>' +
|
130 |
+
'<i class="fa fa-file-o" style="margin-left: 5px; line-height: 12px; font-size: 18px; position: relative; top: 2px;"></i>' +
|
131 |
+
'<?php _e( 'Live Preview', 'GF_FA' ); ?>' +
|
132 |
+
'</a>'+
|
133 |
+
'<div class="gf_submenu"><ul>'+
|
134 |
+
'<li class=""><a target="_blank" href="<?php echo $ajax_true_url; ?>"><?php _e( 'Ajax option enabled' , 'GF_FA'); ?></a></li>'+
|
135 |
+
'<li class=""><a target="_blank" href="<?php echo $ajax_false_url; ?>"><?php _e( 'Ajax option disabled', 'GF_FA' ); ?></a></li>'+
|
136 |
+
'</ul></div>'+
|
137 |
+
'</li>' )
|
138 |
+
.insertAfter( 'li.gf_form_toolbar_preview' );
|
139 |
+
})(jQuery);
|
140 |
+
</script>
|
141 |
+
<?php
|
142 |
+
}
|
143 |
+
|
144 |
+
public function is_applicable_page() {
|
145 |
+
return in_array( rgget( 'page' ), array( 'gf_edit_forms', 'gf_entries' ) ) && rgget( 'id' );
|
146 |
+
}
|
147 |
+
|
148 |
+
public function load_preview_template( $template ) {
|
149 |
+
return get_page_template();
|
150 |
+
}
|
151 |
+
|
152 |
+
public function modify_preview_post_content( $content ) {
|
153 |
+
return $this->get_shortcode();
|
154 |
+
}
|
155 |
+
|
156 |
+
public function get_shortcode( $args = array() ) {
|
157 |
+
|
158 |
+
if( ! is_user_logged_in() )
|
159 |
+
return '<p>' . __( 'You need to log in to preview forms.', 'GF_FA') . '</p>' . wp_login_form( array( 'echo' => false ) );
|
160 |
+
|
161 |
+
if( ! GFCommon::current_user_can_any( 'gravityforms_preview_forms' ) )
|
162 |
+
return __( 'Oops! It doesn\'t look like you have the necessary permission to preview this form.', 'GF_FA' );
|
163 |
+
|
164 |
+
if( empty( $args ) )
|
165 |
+
$args = $this->get_shortcode_parameters_from_query_string();
|
166 |
+
|
167 |
+
extract( wp_parse_args( $args, $this->_args ) );
|
168 |
+
|
169 |
+
$title = $title === true ? 'true' : 'false';
|
170 |
+
$description = $description === true ? 'true' : 'false';
|
171 |
+
$ajax = $ajax === true ? 'true' : 'false';
|
172 |
+
|
173 |
+
return "[gravityform id='$id' title='$title' description='$description' ajax='$ajax']";
|
174 |
+
}
|
175 |
+
|
176 |
+
public function get_shortcode_parameters_from_query_string() {
|
177 |
+
return array_filter( array(
|
178 |
+
'id' => rgget( 'id' ),
|
179 |
+
'title' => rgget( 'title' ),
|
180 |
+
'description' => rgget( 'description' ),
|
181 |
+
'ajax' => rgget( 'ajax' )
|
182 |
+
) );
|
183 |
+
}
|
184 |
+
|
185 |
+
public function is_live_preview() {
|
186 |
+
return is_post_type_archive( $this->post_type );
|
187 |
+
}
|
188 |
+
|
189 |
+
}
|
190 |
+
new GFParsi_LivePreview();
|
includes/class-melli-code.php
ADDED
@@ -0,0 +1,434 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined('ABSPATH') ) exit;
|
2 |
+
|
3 |
+
class GFParsi_MelliCode {
|
4 |
+
|
5 |
+
private $field = array();
|
6 |
+
|
7 |
+
public function __construct() {
|
8 |
+
|
9 |
+
if( is_admin() ) {
|
10 |
+
add_filter('gform_add_field_buttons' , array( $this, 'button'));
|
11 |
+
add_filter('gform_field_type_title' , array( $this, 'title'));
|
12 |
+
add_filter('gform_editor_js_set_default_values' , array( $this, 'label'));
|
13 |
+
add_action('gform_editor_js' , array( $this, 'settings'));
|
14 |
+
add_action('gform_field_standard_settings' , array( $this, 'standard_settings'), 10, 2);
|
15 |
+
add_filter('gform_tooltips' , array( $this, 'tooltips'));
|
16 |
+
add_filter('gform_admin_pre_render' , array( $this ,'admin_conditional_logic' ) );
|
17 |
+
}
|
18 |
+
|
19 |
+
add_action('gform_field_input' , array( $this, 'input'), 10, 5);
|
20 |
+
add_action('gform_field_css_class' , array( $this, 'classes'), 10, 3);
|
21 |
+
add_action('gform_pre_submission' , array( $this, 'pre_submission' ) );
|
22 |
+
add_filter('gform_field_content' , array( $this, 'city'), 10, 5);
|
23 |
+
add_filter('gform_field_validation' , array( $this, 'validator'), 10, 4);
|
24 |
+
add_action('wp_footer' , array( $this, 'js'));
|
25 |
+
add_action('gform_enqueue_scripts' , array( $this, 'external_js') , 10 , 2 );
|
26 |
+
}
|
27 |
+
|
28 |
+
public function button( $field_groups ) {
|
29 |
+
foreach( $field_groups as &$group ){
|
30 |
+
if( $group["name"] == "advanced_fields" ){
|
31 |
+
$group["fields"][] = array(
|
32 |
+
"class"=>"button",
|
33 |
+
"value" => __('National ID', 'GF_FA'),
|
34 |
+
"onclick" => "StartAddField('mellicart');"
|
35 |
+
);
|
36 |
+
|
37 |
+
}
|
38 |
+
}
|
39 |
+
return $field_groups;
|
40 |
+
}
|
41 |
+
|
42 |
+
public function title($type) {
|
43 |
+
if ($type == 'mellicart') {
|
44 |
+
return __('National ID', 'GF_FA');
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
public function label(){
|
49 |
+
?>
|
50 |
+
case "mellicart" :
|
51 |
+
field.label = '<?php _e('National ID', 'GF_FA') ?>';
|
52 |
+
break;
|
53 |
+
<?php
|
54 |
+
}
|
55 |
+
|
56 |
+
public function classes($classes, $field, $form){
|
57 |
+
if( $field["type"] == "mellicart" ){
|
58 |
+
$classes .= " gform_melli_code";
|
59 |
+
}
|
60 |
+
return $classes;
|
61 |
+
}
|
62 |
+
|
63 |
+
public function tooltips( $tooltips ) {
|
64 |
+
$tooltips['gform_melli_code_city'] = __('<h6>نمایش لحظه ای شهر از روی کد ملی </h6>نمایش شهر و پیغام زیر فیلد کد ملی بعد از پر شدن فیلد . تذکر : در صورتی که این گزینه را فعال نمایید ،ممکن است فراخوانی شهر های ایران با توجه به زیاد بودن آنها سبب سنگین شدن صفحه گردد.' , 'GF_FA');
|
65 |
+
$tooltips['gform_melli_code_seperate'] = __('<h6>جدا سازی ارقام</h6>در صورتی که این گزینه را فعال نمایید ، پس از پر شدن فیلد کد ملی ، <strong>در صورتی که کد ملی وارد شده صحیح تشخصی داده شود</strong> ؛ کد ملی به صورت زیر در خواهد آمد و در غیر این صورت علی صحیح نبودن کد ملی زیر فیلد نمایش داده خواهد شد :<br>xxx-xxxxxx-x' , 'GF_FA');
|
66 |
+
$tooltips['gform_melli_code_abnormal'] = __('با توجه به اینکه کد ملی فقط باید به صورت عدد باشد ، در صورتی که کاراکتری غیر از عدد وارد شده باشد پیغام خطا نمایش داده خواهد شد .<br/>پیغام پیشفرض : کد ملی فقط باید به صورت عدد وارد شود .' , 'GF_FA');
|
67 |
+
$tooltips['gform_melli_code_len'] = __('با توجه به اینکه کد ملی می بایست 10 رقمی باشد اگر تعداد رقم وارد شده ، اشتباه باشد پیغام خطا نمایش داده خواهد شد .<br>پیغام پیشفرض : کد ملی می بایست 10 رقمی باشد . تنها در صورتی مجاز به استفاده از کد های 8 یا 9 رقمی هستید که ارقام سمت چپ 0 باشند .' , 'GF_FA');
|
68 |
+
$tooltips['gform_melli_code_dup'] = __('در صورتی که از تب وِیژگی تیک گزینه بدون تکرار را زده باشید ؛ بعد از پر شدن فرم و زدن دکمه ارسال پیغامی مبتنی بر تکراری بودن کد ملی نمایش داده خواهد شد . <br/>پیغام پیشفرض : این کد ملی توسط فرد دیگری ثبت شده است .' , 'GF_FA');
|
69 |
+
$tooltips['gform_melli_code_noStandard'] = __('در صورتی که کد ملی وارد شده مطابق با الگوریتم کشور نباشد پیغام خطا نمایش داده خواهد شد .<br/>پیغام پیشفرض : کد ملی وارد شده مطابق با استانداردهای کشور نمی باشد .' , 'GF_FA');
|
70 |
+
return $tooltips;
|
71 |
+
}
|
72 |
+
|
73 |
+
public function input($input, $field, $value, $lead_id, $form_id ){
|
74 |
+
|
75 |
+
if ( $field["type"] == "mellicart" ) {
|
76 |
+
|
77 |
+
$is_admin = is_admin();
|
78 |
+
$is_frontend = ! $is_admin;
|
79 |
+
$is_form_editor = ( $is_admin && RG_CURRENT_VIEW != 'entry' );
|
80 |
+
$is_entry_page = ( $is_admin && RG_CURRENT_VIEW == 'entry' );
|
81 |
+
|
82 |
+
if ( ! $is_admin && ( RGFormsModel::get_input_type( $field ) == 'adminonly_hidden') ) {
|
83 |
+
return '';
|
84 |
+
}
|
85 |
+
|
86 |
+
$field_id = $field["id"];
|
87 |
+
$form_id = $is_admin && empty($form_id) ? rgget("id") : $form_id;
|
88 |
+
|
89 |
+
$disabled_text = ( $is_admin && RG_CURRENT_VIEW != 'entry' ) ? "disabled='disabled'" : '';
|
90 |
+
|
91 |
+
$size = rgar($field, "size");
|
92 |
+
$class_suffix = RG_CURRENT_VIEW == 'entry' ? '_admin' : '';
|
93 |
+
$class = $size . $class_suffix;
|
94 |
+
|
95 |
+
$html5_attributes = '';
|
96 |
+
|
97 |
+
$tabindex = GFCommon::get_tabindex();
|
98 |
+
|
99 |
+
|
100 |
+
//$this->get_conditional_logic_event( 'keyup' ) //text or radio
|
101 |
+
//$this->get_conditional_logic_event( 'change' ) //select
|
102 |
+
//$this->get_conditional_logic_event( 'click' ) // checkbox or radio
|
103 |
+
//note : radio has keyup and click
|
104 |
+
$logic_event = ! $is_form_editor && ! $is_entry_page ? $field->get_conditional_logic_event( 'keyup' ) : '';
|
105 |
+
|
106 |
+
$input = '<div class="ginput_container ginput_container_text ginput_container_melli_code">';
|
107 |
+
$input .= '<input onblur="melli_code_'.$field_id.'(this);" name="input_'.$field_id.'" id="input_'.$form_id.'_'.$field_id.'" type="text" value="'.esc_attr($value).'" class="melli_code '.esc_attr($size).'" '.$tabindex.' '.$logic_event.' '.$html5_attributes.' '.$disabled_text.'/>';
|
108 |
+
$input .= '</div>';
|
109 |
+
|
110 |
+
if ( $is_frontend ) {
|
111 |
+
$input .= '<span class="city melli_code" id="city_'.$field_id.'"></span>';
|
112 |
+
}
|
113 |
+
|
114 |
+
}
|
115 |
+
|
116 |
+
return $input;
|
117 |
+
}
|
118 |
+
|
119 |
+
public function settings(){ ?>
|
120 |
+
<script type='text/javascript'>
|
121 |
+
fieldSettings["mellicart"] = ".placeholder_setting, .input_mask_setting, .label_placement_setting, .prepopulate_field_setting, .conditional_logic_field_setting, .label_setting, .admin_label_setting, .size_setting, .rules_setting, .visibility_setting, .duplicate_setting, .default_value_setting, .description_setting, .css_class_setting, .mellicart_setting";
|
122 |
+
jQuery(document).bind("gform_load_field_settings", function(event, field, form){
|
123 |
+
jQuery("#field_mellicart").attr("checked", field["field_mellicart"] == true);
|
124 |
+
jQuery("#field_mellicart_sp").attr("checked", field["field_mellicart_sp"] == true);
|
125 |
+
jQuery("#field_mellicart_sp1").val(field["field_mellicart_sp1"]);
|
126 |
+
jQuery("#field_mellicart_sp2").val(field["field_mellicart_sp2"]);
|
127 |
+
jQuery("#field_mellicart_sp3").val(field["field_mellicart_sp3"]);
|
128 |
+
jQuery("#field_mellicart_sp4").val(field["field_mellicart_sp4"]);
|
129 |
+
});
|
130 |
+
</script>
|
131 |
+
<?php
|
132 |
+
}
|
133 |
+
|
134 |
+
|
135 |
+
public function admin_conditional_logic( $form ) {
|
136 |
+
|
137 |
+
if ( GFCommon::is_entry_detail() ) {
|
138 |
+
return $form;
|
139 |
+
}
|
140 |
+
|
141 |
+
echo "<script type='text/javascript'>" .
|
142 |
+
" gform.addFilter('gform_is_conditional_logic_field', function (isConditionalLogicField, field) {" .
|
143 |
+
" return field.type == 'mellicart' ? true : isConditionalLogicField;" .
|
144 |
+
' });' .
|
145 |
+
" gform.addFilter('gform_conditional_logic_operators', function (operators, objectType, fieldId) {" .
|
146 |
+
' var targetField = GetFieldById(fieldId);' .
|
147 |
+
" if (targetField && targetField['type'] == 'mellicart') {" .
|
148 |
+
" operators = {'is':'is','isnot':'isNot', '>':'greaterThan', '<':'lessThan', 'contains':'contains', 'starts_with':'startsWith', 'ends_with':'endsWith'};" .
|
149 |
+
' }' .
|
150 |
+
' return operators;' .
|
151 |
+
' });' .
|
152 |
+
'</script>';
|
153 |
+
|
154 |
+
return $form;
|
155 |
+
}
|
156 |
+
|
157 |
+
public function standard_settings( $position, $form_id ){
|
158 |
+
|
159 |
+
if( $position == 50 ){ ?>
|
160 |
+
|
161 |
+
<li class="mellicart_setting field_setting">
|
162 |
+
|
163 |
+
<input type="checkbox" id="field_mellicart" onclick="SetFieldProperty('field_mellicart', this.checked);" />
|
164 |
+
<label for="field_mellicart" class="inline">
|
165 |
+
<?php _e("نمایش شهر بر اساس کد ملی", "GF_FA"); ?>
|
166 |
+
<?php gform_tooltip("gform_melli_code_city"); ?>
|
167 |
+
</label>
|
168 |
+
|
169 |
+
|
170 |
+
<br/>
|
171 |
+
<input type="checkbox" id="field_mellicart_sp" onclick="SetFieldProperty('field_mellicart_sp', this.checked);" />
|
172 |
+
<label for="field_mellicart_sp" class="inline">
|
173 |
+
<?php _e("جدا سازی خودکار ارقام توسط خط فاصله", "GF_FA"); ?>
|
174 |
+
<?php gform_tooltip("gform_melli_code_seperate"); ?>
|
175 |
+
</label>
|
176 |
+
<br/>
|
177 |
+
|
178 |
+
|
179 |
+
<br/>
|
180 |
+
<label for="field_mellicart_sp1" >
|
181 |
+
<?php _e("پیغام زمانی که مقدار وارد شده شامل کاراکتر غیر عددی باشد", "GF_FA"); ?>
|
182 |
+
<?php gform_tooltip("gform_melli_code_abnormal"); ?>
|
183 |
+
</label>
|
184 |
+
<input type="text" class="fieldwidth-3" id="field_mellicart_sp1" size="35" onkeyup="SetFieldProperty('field_mellicart_sp1', this.value);" />
|
185 |
+
<br/>
|
186 |
+
|
187 |
+
|
188 |
+
<br/>
|
189 |
+
<label for="field_mellicart_sp2" >
|
190 |
+
<?php _e("پیغام زمانیکه تعداد ارقام وارد شده استاندارد نباشد", "GF_FA"); ?>
|
191 |
+
<?php gform_tooltip("gform_melli_code_len"); ?>
|
192 |
+
</label>
|
193 |
+
<input type="text" class="fieldwidth-3" id="field_mellicart_sp2" size="35" onkeyup="SetFieldProperty('field_mellicart_sp2', this.value);" />
|
194 |
+
<br/>
|
195 |
+
|
196 |
+
|
197 |
+
<br/>
|
198 |
+
<label for="field_mellicart_sp3" >
|
199 |
+
<?php _e("پیغام زمانیکه کد ملی وارد شده قبلا ثبت شده باشد", "GF_FA"); ?>
|
200 |
+
<?php gform_tooltip("gform_melli_code_dup"); ?>
|
201 |
+
</label>
|
202 |
+
<input type="text" class="fieldwidth-3" id="field_mellicart_sp3" size="35" onkeyup="SetFieldProperty('field_mellicart_sp3', this.value);" />
|
203 |
+
<br/>
|
204 |
+
|
205 |
+
|
206 |
+
<br/>
|
207 |
+
<label for="field_mellicart_sp4" >
|
208 |
+
<?php _e("پیغام زمانیکه کد ملی وارد شده مطابق با الگوی ملی نباشد", "GF_FA"); ?>
|
209 |
+
<?php gform_tooltip("gform_melli_code_noStandard"); ?>
|
210 |
+
</label>
|
211 |
+
<input type="text" class="fieldwidth-3" id="field_mellicart_sp4" size="35" onkeyup="SetFieldProperty('field_mellicart_sp4', this.value);" />
|
212 |
+
<br/>
|
213 |
+
|
214 |
+
|
215 |
+
</li>
|
216 |
+
<?php
|
217 |
+
}
|
218 |
+
}
|
219 |
+
|
220 |
+
|
221 |
+
public function pre_submission( $form ) {
|
222 |
+
|
223 |
+
$mellicart_fields = GFCommon::get_fields_by_type( $form, array( 'mellicart' ) );
|
224 |
+
|
225 |
+
foreach ( (array) $mellicart_fields as $field ) {
|
226 |
+
|
227 |
+
$input_name = "input_{$field['id']}";
|
228 |
+
$input_value = ! rgempty( $input_name ) ? rgpost( $input_name ) : '';
|
229 |
+
|
230 |
+
if ( !empty( $input_value ) ) {
|
231 |
+
|
232 |
+
if ( strlen($input_value) == 8 ) {
|
233 |
+
$_POST["input_{$field['id']}"] = '00'.$input_value;
|
234 |
+
}
|
235 |
+
elseif ( strlen($input_value) == 9 ) {
|
236 |
+
$_POST["input_{$field['id']}"] = '0'.$input_value;
|
237 |
+
}
|
238 |
+
else {
|
239 |
+
$_POST["input_{$field['id']}"] = $input_value;
|
240 |
+
}
|
241 |
+
}
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
+
public function city( $content, $field, $value, $lead_id, $form_id ){
|
246 |
+
|
247 |
+
if ( $field['type'] == 'mellicart' ) {
|
248 |
+
if ( ! is_admin() ) {
|
249 |
+
$this->field[] = $field;
|
250 |
+
}
|
251 |
+
}
|
252 |
+
return $content;
|
253 |
+
}
|
254 |
+
|
255 |
+
public function external_js( $form , $ajax ) {
|
256 |
+
|
257 |
+
$melli_code = GFCommon::get_fields_by_type( $form, array( 'mellicart' ) );
|
258 |
+
|
259 |
+
foreach ( (array) $melli_code as $field ) {
|
260 |
+
|
261 |
+
$is_seperate = rgget('field_mellicart_sp', $field);
|
262 |
+
$is_seperate = !empty($is_seperate) ? $is_seperate : false;
|
263 |
+
|
264 |
+
$show_city = rgget('field_mellicart', $field);
|
265 |
+
$show_city = !empty($show_city) ? $show_city : false;
|
266 |
+
|
267 |
+
if ( $show_city || $is_seperate) {
|
268 |
+
wp_register_script( 'gform_mellicode', GF_PARSI_URL . 'assets/js/melli-code.min.js', array() , GF_PARSI_VERSION, false );
|
269 |
+
wp_enqueue_script( 'gform_mellicode' );
|
270 |
+
break;
|
271 |
+
}
|
272 |
+
}
|
273 |
+
}
|
274 |
+
|
275 |
+
public function js() {
|
276 |
+
|
277 |
+
$fields = $this->field;
|
278 |
+
|
279 |
+
if ( empty($fields) )
|
280 |
+
return;
|
281 |
+
|
282 |
+
foreach( (array) $fields as $field ) {
|
283 |
+
|
284 |
+
$is_seperate = rgget('field_mellicart_sp', $field);
|
285 |
+
$is_seperate = !empty($is_seperate) && $is_seperate ? 1 : 0;
|
286 |
+
|
287 |
+
$show_city = rgget('field_mellicart', $field);
|
288 |
+
$show_city = !empty($show_city) && $show_city ? 1 : 0;
|
289 |
+
|
290 |
+
if ( !$show_city && !$is_seperate )
|
291 |
+
return;
|
292 |
+
|
293 |
+
$message1 = rgget('field_mellicart_sp1', $field);
|
294 |
+
$message1 = !empty($message1) ? $message1 : __('کد ملی فقط باید به صورت عدد وارد شود .', 'GF_FA');
|
295 |
+
|
296 |
+
$message2 = rgget('field_mellicart_sp2', $field);
|
297 |
+
$message2 = !empty($message2) ? $message2 : __('کد ملی می بایست 10 رقمی باشد .', 'GF_FA');
|
298 |
+
|
299 |
+
$message3 = rgget('field_mellicart_sp4', $field);
|
300 |
+
$message3 = !empty($message3) ? $message3 : __('کد ملی وارد شده مطابق با استانداردهای کشور نمی باشد .', 'GF_FA');
|
301 |
+
?>
|
302 |
+
|
303 |
+
<script type="text/javascript">
|
304 |
+
function melli_code_<?php echo $field['id']; ?> (melli_code) {
|
305 |
+
var field_id = "<?php echo $field['id'] ?>";
|
306 |
+
var message1 = "<?php echo $message1 ?>";
|
307 |
+
var message2 = "<?php echo $message2 ?>";
|
308 |
+
var message3 = "<?php echo $message3 ?>";
|
309 |
+
var show_city = <?php echo $show_city ?>;
|
310 |
+
var is_seperate = <?php echo $is_seperate ?>;
|
311 |
+
melli_code_function( melli_code, field_id , message1 , message2 , message3 , is_seperate , show_city);
|
312 |
+
}
|
313 |
+
</script>
|
314 |
+
|
315 |
+
<?php
|
316 |
+
}
|
317 |
+
}
|
318 |
+
|
319 |
+
public function is_valid( $melli_code = '' ){
|
320 |
+
|
321 |
+
if ( !empty($melli_code) ) {
|
322 |
+
|
323 |
+
$_melli_code = $melli_code;
|
324 |
+
|
325 |
+
if( strlen($melli_code) == 8 )
|
326 |
+
$_melli_code = '00' . $melli_code;
|
327 |
+
|
328 |
+
if( strlen($melli_code) == 9 )
|
329 |
+
$_melli_code = '0' . $melli_code;
|
330 |
+
|
331 |
+
$pre_check = array(
|
332 |
+
'0000000000',
|
333 |
+
'1111111111',
|
334 |
+
'2222222222',
|
335 |
+
'3333333333',
|
336 |
+
'4444444444',
|
337 |
+
'5555555555',
|
338 |
+
'6666666666',
|
339 |
+
'7777777777',
|
340 |
+
'8888888888',
|
341 |
+
'9999999999',
|
342 |
+
);
|
343 |
+
|
344 |
+
if( in_array( $_melli_code , $pre_check ) )
|
345 |
+
return 2;
|
346 |
+
|
347 |
+
if( ! is_numeric($melli_code) )
|
348 |
+
return 4;
|
349 |
+
|
350 |
+
$melli_code = (string) preg_replace('/[^0-9]/','',$melli_code);
|
351 |
+
|
352 |
+
if( strlen($melli_code) > 10 || strlen($melli_code) <8 )
|
353 |
+
return 3;
|
354 |
+
|
355 |
+
$melli_code = $_melli_code;
|
356 |
+
|
357 |
+
$list_code = str_split($melli_code);
|
358 |
+
$last = (int) $list_code[9];
|
359 |
+
unset($list_code[9]);
|
360 |
+
|
361 |
+
$i = 10;
|
362 |
+
$sum = 0;
|
363 |
+
foreach( $list_code as $key => $val ) {
|
364 |
+
$sum += intval($val) * $i;
|
365 |
+
$i--;
|
366 |
+
}
|
367 |
+
|
368 |
+
$mod =(int) $sum % 11;
|
369 |
+
|
370 |
+
if($mod >= 2)
|
371 |
+
$mod = 11 - $mod;
|
372 |
+
if ($mod != $last)
|
373 |
+
return 2;
|
374 |
+
else
|
375 |
+
return 1;
|
376 |
+
}
|
377 |
+
|
378 |
+
return false;
|
379 |
+
}
|
380 |
+
|
381 |
+
|
382 |
+
public function validator($result, $value, $form, $field){
|
383 |
+
|
384 |
+
if ( $field["type"] == 'mellicart' ) {
|
385 |
+
|
386 |
+
$melli_code = !empty($value) ? str_replace( '-', '', $value) : '';
|
387 |
+
|
388 |
+
$is_valid = $this->is_valid($melli_code);
|
389 |
+
|
390 |
+
if ( $is_valid == 4 ) {
|
391 |
+
$message = rgget('field_mellicart_sp1', $field);
|
392 |
+
$result['message'] = !empty($message) ? $message : __('کد ملی فقط باید به صورت عدد وارد شود .' , 'GF_FA');
|
393 |
+
$result['is_valid'] = false;
|
394 |
+
return $result;
|
395 |
+
}
|
396 |
+
|
397 |
+
if ( $is_valid == 3 ){
|
398 |
+
$message = rgget('field_mellicart_sp2', $field);
|
399 |
+
$result['message'] = !empty($message) ? $message : __('کد ملی می بایست 10 رقمی باشد . تنها در صورتی مجاز به استفاده از کد های 8 یا 9 رقمی هستید که ارقام سمت چپ 0 باشند .' , 'GF_FA');
|
400 |
+
$result['is_valid'] = false;
|
401 |
+
return $result;
|
402 |
+
}
|
403 |
+
|
404 |
+
if ( $is_valid == 2 ) {
|
405 |
+
$message = rgget('field_mellicart_sp4', $field);
|
406 |
+
$result['message'] = !empty($message) ? $message : __('کد ملی وارد شده مطابق با استانداردهای کشور نمی باشد .' , 'GF_FA');
|
407 |
+
$result['is_valid'] = false;
|
408 |
+
return $result;
|
409 |
+
}
|
410 |
+
|
411 |
+
if ( $field['noDuplicates'] ) {
|
412 |
+
|
413 |
+
if( strlen($melli_code) == 8 )
|
414 |
+
$melli_code = '00' . $melli_code;
|
415 |
+
|
416 |
+
if( strlen($melli_code) == 9 )
|
417 |
+
$melli_code = '0' . $melli_code;
|
418 |
+
|
419 |
+
if ( RGFormsModel::is_duplicate($form['id'], $field, $melli_code) ) {
|
420 |
+
$message = rgget('field_mellicart_sp3', $field);
|
421 |
+
$result['message'] = !empty($message) ? $message : __('این کد ملی توسط فرد دیگری ثبت شده است .' , 'GF_FA');
|
422 |
+
$result['is_valid'] = false;
|
423 |
+
return $result;
|
424 |
+
}
|
425 |
+
}
|
426 |
+
}
|
427 |
+
|
428 |
+
return $result;
|
429 |
+
}
|
430 |
+
|
431 |
+
|
432 |
+
}
|
433 |
+
|
434 |
+
new GFParsi_MelliCode();
|
include/Multipage_Navigation.php → includes/class-multipage-navigation.php
RENAMED
@@ -1,35 +1,21 @@
|
|
1 |
-
<?php
|
2 |
-
|
|
|
3 |
|
4 |
public $_args = array();
|
5 |
|
6 |
private static $script_displayed;
|
7 |
-
private static $non_global_forms = array();
|
8 |
-
|
9 |
-
function __construct( $args = array() ) {
|
10 |
-
|
11 |
-
// set our default arguments, parse against the provided arguments, and store for use throughout the class
|
12 |
-
$this->_args = wp_parse_args( $args, array(
|
13 |
-
'form_id' => false,
|
14 |
-
'form_ids' => false,
|
15 |
-
'activate_on_last_page' => true
|
16 |
-
) );
|
17 |
-
|
18 |
-
if( $this->_args['form_ids'] ) {
|
19 |
-
$form_ids = $this->_args['form_ids'];
|
20 |
-
} else if( $this->_args['form_id'] ) {
|
21 |
-
$form_ids = $this->_args['form_id'];
|
22 |
-
} else {
|
23 |
-
$form_ids = array();
|
24 |
-
}
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
30 |
|
31 |
add_filter( 'gform_pre_render', array( $this, 'output_navigation_script' ), 10, 2 );
|
32 |
-
|
33 |
}
|
34 |
|
35 |
function output_navigation_script( $form, $is_ajax ) {
|
@@ -38,9 +24,6 @@ class GFIR_MultipageNavigation {
|
|
38 |
if( count($form['pagination']['pages']) <= 1 )
|
39 |
return $form;
|
40 |
|
41 |
-
if( ! $this->is_applicable_form( $form['id'] ) )
|
42 |
-
return $form;
|
43 |
-
|
44 |
$this->register_script( $form );
|
45 |
|
46 |
if( ! $this->_args['activate_on_last_page'] || $this->is_last_page( $form ) || $this->is_last_page_reached() ) {
|
@@ -66,8 +49,7 @@ class GFIR_MultipageNavigation {
|
|
66 |
this.currentPage = args.currentPage;
|
67 |
this.lastPage = args.lastPage;
|
68 |
this.activateOnLastPage = args.activateOnLastPage;
|
69 |
-
|
70 |
-
|
71 |
this.init = function() {
|
72 |
|
73 |
// if this form is ajax-enabled, we'll need to get the current page via JS
|
@@ -93,9 +75,6 @@ class GFIR_MultipageNavigation {
|
|
93 |
|
94 |
});
|
95 |
|
96 |
-
if( !this.isLastPage() && this.activateOnLastPage )
|
97 |
-
this.addBackToLastPageButton();
|
98 |
-
|
99 |
$(document).on('click', '#gform_' + this.formId + ' a.gfirmpn-page-link', function(event){
|
100 |
event.preventDefault();
|
101 |
|
@@ -119,11 +98,6 @@ class GFIR_MultipageNavigation {
|
|
119 |
this.formElem.submit();
|
120 |
}
|
121 |
|
122 |
-
this.addBackToLastPageButton = function() {
|
123 |
-
this.formElem.find('#gform_page_' + this.formId + '_' + this.currentPage + ' .gform_page_footer')
|
124 |
-
.append('<input type="button" onclick="gfirmpn.postToPage(' + this.lastPage + ')" value="' + this.labels.lastPageButton + '" class="button gform_last_page_button">');
|
125 |
-
}
|
126 |
-
|
127 |
this.getCurrentPage = function() {
|
128 |
return this.formElem.find( 'input#gform_source_page_number_' + this.formId ).val();
|
129 |
}
|
@@ -163,9 +137,6 @@ class GFIR_MultipageNavigation {
|
|
163 |
'currentPage' => $page_number,
|
164 |
'lastPage' => $last_page,
|
165 |
'activateOnLastPage' => $this->_args['activate_on_last_page'],
|
166 |
-
'labels' => array(
|
167 |
-
'lastPageButton' => __( 'Back to Last Page' )
|
168 |
-
)
|
169 |
);
|
170 |
|
171 |
$script = "window.gfirmpn = new gfirmpnObj(" . json_encode( $args ) . ");";
|
@@ -185,12 +156,5 @@ class GFIR_MultipageNavigation {
|
|
185 |
return rgpost('gfir_last_page_reached');
|
186 |
}
|
187 |
|
188 |
-
|
189 |
-
|
190 |
-
$is_global_form = ! in_array( $form_id, self::$non_global_forms );
|
191 |
-
$is_current_non_global_form = ! $is_global_form && in_array( $form_id, $this->_args['form_ids'] );
|
192 |
-
|
193 |
-
return $is_global_form || $is_current_non_global_form;
|
194 |
-
}
|
195 |
-
|
196 |
-
}
|
1 |
+
<?php if ( ! defined( 'ABSPATH' ) ) exit;
|
2 |
+
|
3 |
+
class GFParsi_MultipageNavigation {
|
4 |
|
5 |
public $_args = array();
|
6 |
|
7 |
private static $script_displayed;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
+
function __construct() {
|
10 |
+
|
11 |
+
if ( is_admin() )
|
12 |
+
return;
|
13 |
+
|
14 |
+
$this->_args = array(
|
15 |
+
'activate_on_last_page' => apply_filters( 'gf_mn_activate_on_last_page' , true )
|
16 |
+
);
|
17 |
|
18 |
add_filter( 'gform_pre_render', array( $this, 'output_navigation_script' ), 10, 2 );
|
|
|
19 |
}
|
20 |
|
21 |
function output_navigation_script( $form, $is_ajax ) {
|
24 |
if( count($form['pagination']['pages']) <= 1 )
|
25 |
return $form;
|
26 |
|
|
|
|
|
|
|
27 |
$this->register_script( $form );
|
28 |
|
29 |
if( ! $this->_args['activate_on_last_page'] || $this->is_last_page( $form ) || $this->is_last_page_reached() ) {
|
49 |
this.currentPage = args.currentPage;
|
50 |
this.lastPage = args.lastPage;
|
51 |
this.activateOnLastPage = args.activateOnLastPage;
|
52 |
+
|
|
|
53 |
this.init = function() {
|
54 |
|
55 |
// if this form is ajax-enabled, we'll need to get the current page via JS
|
75 |
|
76 |
});
|
77 |
|
|
|
|
|
|
|
78 |
$(document).on('click', '#gform_' + this.formId + ' a.gfirmpn-page-link', function(event){
|
79 |
event.preventDefault();
|
80 |
|
98 |
this.formElem.submit();
|
99 |
}
|
100 |
|
|
|
|
|
|
|
|
|
|
|
101 |
this.getCurrentPage = function() {
|
102 |
return this.formElem.find( 'input#gform_source_page_number_' + this.formId ).val();
|
103 |
}
|
137 |
'currentPage' => $page_number,
|
138 |
'lastPage' => $last_page,
|
139 |
'activateOnLastPage' => $this->_args['activate_on_last_page'],
|
|
|
|
|
|
|
140 |
);
|
141 |
|
142 |
$script = "window.gfirmpn = new gfirmpnObj(" . json_encode( $args ) . ");";
|
156 |
return rgpost('gfir_last_page_reached');
|
157 |
}
|
158 |
|
159 |
+
}
|
160 |
+
$gfir_multipage_navigation = new GFParsi_MultipageNavigation( array() );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-news-letter.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined('ABSPATH') ) exit;
|
2 |
+
|
3 |
+
class GFParsi_Newsletter {
|
4 |
+
|
5 |
+
private static $instance = null;
|
6 |
+
|
7 |
+
public static function get_instance() {
|
8 |
+
if( null == self::$instance )
|
9 |
+
self::$instance = new self;
|
10 |
+
return self::$instance;
|
11 |
+
}
|
12 |
+
|
13 |
+
private function __construct() {
|
14 |
+
add_filter( 'gform_notification_events', array( $this, 'add_manual_notification_event' ) );
|
15 |
+
add_filter( 'gform_before_resend_notifications', array( $this, 'add_notification_filter' ) );
|
16 |
+
}
|
17 |
+
|
18 |
+
public function add_notification_filter( $form ) {
|
19 |
+
add_filter( 'gform_notification', array( $this, 'evaluate_notification_conditional_logic' ), 10, 3 );
|
20 |
+
return $form;
|
21 |
+
}
|
22 |
+
|
23 |
+
public function add_manual_notification_event( $events ) {
|
24 |
+
$events['manual'] = __( 'Newsletter', 'GF_FA' );
|
25 |
+
return $events;
|
26 |
+
}
|
27 |
+
|
28 |
+
public function evaluate_notification_conditional_logic( $notification, $form, $entry ) {
|
29 |
+
|
30 |
+
// if it fails conditional logic, suppress it
|
31 |
+
if( $notification['event'] == 'manual' && ! GFCommon::evaluate_conditional_logic( rgar( $notification, 'conditionalLogic' ), $form, $entry ) ) {
|
32 |
+
add_filter( 'gform_pre_send_email', array( $this, 'abort_next_notification' ) );
|
33 |
+
}
|
34 |
+
|
35 |
+
return $notification;
|
36 |
+
}
|
37 |
+
|
38 |
+
public function abort_next_notification( $args ) {
|
39 |
+
remove_filter( 'gform_pre_send_email', array( $this, 'abort_next_notification' ) );
|
40 |
+
$args['abort_email'] = true;
|
41 |
+
return $args;
|
42 |
+
}
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
function GFParsi_Newsletter() {
|
47 |
+
return GFParsi_Newsletter::get_instance();
|
48 |
+
}
|
49 |
+
|
50 |
+
GFParsi_Newsletter();
|
includes/class-post-content-merge-tags.php
ADDED
@@ -0,0 +1,245 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined('ABSPATH') ) exit;
|
2 |
+
|
3 |
+
class GFParsi_Post_Content_Merge_Tags {
|
4 |
+
|
5 |
+
public static $_entry = null;
|
6 |
+
|
7 |
+
private static $instance = null;
|
8 |
+
|
9 |
+
public static function get_instance( $args = array() ) {
|
10 |
+
|
11 |
+
if( self::$instance == null )
|
12 |
+
self::$instance = new self( $args );
|
13 |
+
|
14 |
+
return self::$instance;
|
15 |
+
}
|
16 |
+
|
17 |
+
function __construct( $args ) {
|
18 |
+
|
19 |
+
if( ! class_exists( 'GFForms' ) )
|
20 |
+
return;
|
21 |
+
|
22 |
+
$this->_args = wp_parse_args( $args, array(
|
23 |
+
'auto_append_lead' => true, // true, false or array of form IDs
|
24 |
+
'encrypt_lead' => false,
|
25 |
+
) );
|
26 |
+
|
27 |
+
add_filter( 'the_content', array( $this, 'replace_merge_tags' ), 1 );
|
28 |
+
add_filter( 'gform_replace_merge_tags', array( $this, 'replace_encrypt_entry_id_merge_tag' ), 10, 3 );
|
29 |
+
|
30 |
+
if( ! empty( $this->_args['auto_append_lead'] ) ) {
|
31 |
+
add_filter( 'gform_confirmation', array( $this, 'append_lead_parameter' ), 20, 3 );
|
32 |
+
}
|
33 |
+
|
34 |
+
}
|
35 |
+
|
36 |
+
function replace_merge_tags( $post_content ) {
|
37 |
+
|
38 |
+
$entry = $this->get_entry();
|
39 |
+
if( ! $entry )
|
40 |
+
return $this->replace_field_label_merge_tags( $post_content, '' );
|
41 |
+
|
42 |
+
if ( !empty($entry["transaction_id"]) ) {
|
43 |
+
|
44 |
+
if ( gform_get_meta( rgar($entry,'id') , 'gform_page_confirm') )
|
45 |
+
return $this->replace_field_label_merge_tags( $post_content, '' );
|
46 |
+
|
47 |
+
gform_update_meta($entry['id'], 'gform_page_confirm', 'true');
|
48 |
+
}
|
49 |
+
|
50 |
+
$form = GFFormsModel::get_form_meta( $entry['form_id'] );
|
51 |
+
|
52 |
+
$post_content = $this->replace_field_label_merge_tags( $post_content, $form );
|
53 |
+
$post_content = GFCommon::replace_variables( $post_content, $form, $entry, false, false, false );
|
54 |
+
|
55 |
+
return $post_content;
|
56 |
+
}
|
57 |
+
|
58 |
+
function replace_field_label_merge_tags( $text, $form ) {
|
59 |
+
|
60 |
+
if ( !empty($form) ) {
|
61 |
+
|
62 |
+
preg_match_all( '/{([^:]+?)}/', $text, $matches, PREG_SET_ORDER );
|
63 |
+
if( empty( $matches ) )
|
64 |
+
return $text;
|
65 |
+
|
66 |
+
foreach( $matches as $match ) {
|
67 |
+
|
68 |
+
list( $search, $field_label ) = $match;
|
69 |
+
|
70 |
+
foreach( $form['fields'] as $field ) {
|
71 |
+
|
72 |
+
$full_input_id = false;
|
73 |
+
$matches_admin_label = rgar( $field, 'adminLabel' ) == $field_label;
|
74 |
+
$matches_field_label = false;
|
75 |
+
|
76 |
+
if( is_array( $field['inputs'] ) ) {
|
77 |
+
foreach( $field['inputs'] as $input ) {
|
78 |
+
if( GFFormsModel::get_label( $field, $input['id'] ) == $field_label ) {
|
79 |
+
$matches_field_label = true;
|
80 |
+
$input_id = $input['id'];
|
81 |
+
break;
|
82 |
+
}
|
83 |
+
}
|
84 |
+
} else {
|
85 |
+
$matches_field_label = GFFormsModel::get_label( $field ) == $field_label;
|
86 |
+
$input_id = $field['id'];
|
87 |
+
}
|
88 |
+
|
89 |
+
if( ! $matches_admin_label && ! $matches_field_label )
|
90 |
+
continue;
|
91 |
+
|
92 |
+
$replace = sprintf( '{%s:%s}', $field_label, (string) $input_id );
|
93 |
+
$text = str_replace( $search, $replace, $text );
|
94 |
+
|
95 |
+
break;
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
99 |
+
else {
|
100 |
+
|
101 |
+
preg_match_all( '/{[^{]*?:(\d+(\.\d+)?)(:(.*?))?}/mi', $text, $matches, PREG_SET_ORDER );
|
102 |
+
if( !empty( $matches ) ) {
|
103 |
+
foreach( $matches as $match ) {
|
104 |
+
if ( isset($match[0]))
|
105 |
+
$text = str_replace( $match[0], '' , $text );
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
unset($matches);
|
110 |
+
|
111 |
+
preg_match_all( '/{([^:]+?)}/', $text, $matches, PREG_SET_ORDER );
|
112 |
+
if( !empty( $matches ) ) {
|
113 |
+
foreach( $matches as $match ) {
|
114 |
+
if ( isset($match[0]))
|
115 |
+
$text = str_replace( $match[0], '' , $text );
|
116 |
+
}
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
return $text;
|
121 |
+
}
|
122 |
+
|
123 |
+
function replace_encrypt_entry_id_merge_tag( $text, $form, $entry ) {
|
124 |
+
|
125 |
+
if( strpos( $text, '{encrypted_entry_id}' ) === false ) {
|
126 |
+
return $text;
|
127 |
+
}
|
128 |
+
|
129 |
+
// $entry is not always a "full" entry
|
130 |
+
$entry_id = rgar( $entry, 'id' );
|
131 |
+
if( $entry_id ) {
|
132 |
+
$entry_id = $this->prepare_lead( $entry['id'], true );
|
133 |
+
}
|
134 |
+
|
135 |
+
return str_replace( '{encrypted_entry_id}', $entry_id, $text );
|
136 |
+
}
|
137 |
+
|
138 |
+
function append_lead_parameter( $confirmation, $form, $entry ) {
|
139 |
+
|
140 |
+
$is_ajax_redirect = is_string( $confirmation ) && strpos( $confirmation, 'gformRedirect' );
|
141 |
+
$is_redirect = is_array( $confirmation ) && isset( $confirmation['redirect'] );
|
142 |
+
|
143 |
+
if( ! $this->is_auto_lead_enabled( $form ) || ! ( $is_ajax_redirect || $is_redirect ) ) {
|
144 |
+
return $confirmation;
|
145 |
+
}
|
146 |
+
|
147 |
+
$lead = $this->prepare_lead( $entry['id'] );
|
148 |
+
|
149 |
+
if( $is_ajax_redirect ) {
|
150 |
+
preg_match_all( '/gformRedirect.+?(http.+?)(?=\'|")/', $confirmation, $matches, PREG_SET_ORDER );
|
151 |
+
list( $full_match, $url ) = $matches[0];
|
152 |
+
$redirect_url = add_query_arg( array( 'lead' => $lead ), $url );
|
153 |
+
$confirmation = str_replace( $url, $redirect_url, $confirmation );
|
154 |
+
} else {
|
155 |
+
$redirect_url = add_query_arg( array( 'lead' => $lead ), $confirmation['redirect'] );
|
156 |
+
$confirmation['redirect'] = $redirect_url;
|
157 |
+
}
|
158 |
+
|
159 |
+
return $confirmation;
|
160 |
+
}
|
161 |
+
|
162 |
+
function prepare_lead( $entry_id, $force_encrypt = false ) {
|
163 |
+
|
164 |
+
$lead = $entry_id;
|
165 |
+
$do_encrypt = $force_encrypt || $this->_args['encrypt_lead'];
|
166 |
+
|
167 |
+
if( $do_encrypt && is_callable( array( 'GFCommon', 'encrypt' ) ) ) {
|
168 |
+
$lead = rawurlencode( GFCommon::encrypt( $lead ) );
|
169 |
+
}
|
170 |
+
|
171 |
+
return $lead;
|
172 |
+
}
|
173 |
+
|
174 |
+
function get_entry() {
|
175 |
+
|
176 |
+
if( ! self::$_entry ) {
|
177 |
+
|
178 |
+
$entry_id = $this->get_entry_id();
|
179 |
+
if( ! $entry_id )
|
180 |
+
return false;
|
181 |
+
|
182 |
+
$entry = GFFormsModel::get_lead( $entry_id );
|
183 |
+
if( empty( $entry ) )
|
184 |
+
return false;
|
185 |
+
|
186 |
+
self::$_entry = $entry;
|
187 |
+
|
188 |
+
}
|
189 |
+
|
190 |
+
return self::$_entry;
|
191 |
+
}
|
192 |
+
|
193 |
+
function get_entry_id() {
|
194 |
+
|
195 |
+
$entry_id = rgget( 'lead' );
|
196 |
+
if( $entry_id ) {
|
197 |
+
return $this->maybe_decrypt_entry_id( $entry_id );
|
198 |
+
}
|
199 |
+
|
200 |
+
$post = get_post();
|
201 |
+
if( $post ) {
|
202 |
+
$entry_id = get_post_meta( $post->ID, '_gform-entry-id', true );
|
203 |
+
}
|
204 |
+
|
205 |
+
return $entry_id ? $entry_id : false;
|
206 |
+
}
|
207 |
+
|
208 |
+
function maybe_decrypt_entry_id( $entry_id ) {
|
209 |
+
|
210 |
+
// if encryption is enabled, 'lead' parameter MUST be encrypted
|
211 |
+
$do_encrypt = $this->_args['encrypt_lead'];
|
212 |
+
|
213 |
+
if( ! $entry_id ) {
|
214 |
+
return null;
|
215 |
+
} else if( ! $do_encrypt && is_numeric( $entry_id ) && intval( $entry_id ) > 0 ) {
|
216 |
+
return $entry_id;
|
217 |
+
} else {
|
218 |
+
// gEYs6Cqzh1akKc7Y4RGkV8HtcJqQZRmNH+ONxuFEvXM
|
219 |
+
// 0FSCGpzzmt+4Y05fFsJ4ipRZfqD/zdi2ecEeMMRKCjc=
|
220 |
+
$entry_id = is_callable( array( 'GFCommon', 'decrypt' ) ) ? GFCommon::decrypt( $entry_id ) : $entry_id;
|
221 |
+
return intval( $entry_id );
|
222 |
+
}
|
223 |
+
|
224 |
+
}
|
225 |
+
|
226 |
+
function is_auto_lead_enabled( $form ) {
|
227 |
+
|
228 |
+
$auto_append_lead = $this->_args['auto_append_lead'];
|
229 |
+
|
230 |
+
if( is_bool( $auto_append_lead ) && $auto_append_lead === true )
|
231 |
+
return true;
|
232 |
+
|
233 |
+
if( is_array( $auto_append_lead ) && in_array( $form['id'], $auto_append_lead ) )
|
234 |
+
return true;
|
235 |
+
|
236 |
+
return false;
|
237 |
+
}
|
238 |
+
|
239 |
+
}
|
240 |
+
|
241 |
+
function GFParsi_Post_Content_Merge_Tags( $args = array() ) {
|
242 |
+
return GFParsi_Post_Content_Merge_Tags::get_instance( $args );
|
243 |
+
}
|
244 |
+
|
245 |
+
GFParsi_Post_Content_Merge_Tags();
|
include/Pre_Submission.php → includes/class-pre-submission.php
RENAMED
@@ -1,9 +1,6 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
* http://gravityforms.ir
|
5 |
-
*/
|
6 |
-
class GFIR_PreSubmission {
|
7 |
|
8 |
private static $lead;
|
9 |
|
@@ -13,7 +10,7 @@ class GFIR_PreSubmission {
|
|
13 |
|
14 |
public static function replace_merge_tags( $form ) {
|
15 |
|
16 |
-
$current_page = isset(GFFormDisplay::$submission[$form['id']]) ? GFFormDisplay::$submission[$form['id']]['page_number'] : 1;
|
17 |
$fields = array();
|
18 |
|
19 |
// get all HTML fields on the current page
|
@@ -154,12 +151,12 @@ class GFIR_PreSubmission {
|
|
154 |
// add filter that will handle getting temporary URLs for file uploads and post image fields (removed below)
|
155 |
// beware, the RGFormsModel::create_lead() function also triggers the gform_merge_tag_filter at some point and will
|
156 |
// result in an infinite loop if not called first above
|
157 |
-
add_filter('gform_merge_tag_filter', array('
|
158 |
|
159 |
$content = GFCommon::replace_variables($content, $form, $lead, false, false, false);
|
160 |
|
161 |
// remove filter so this function is not applied after preview functionality is complete
|
162 |
-
remove_filter('gform_merge_tag_filter', array('
|
163 |
|
164 |
return $content;
|
165 |
}
|
@@ -176,4 +173,6 @@ class GFIR_PreSubmission {
|
|
176 |
|
177 |
}
|
178 |
|
179 |
-
}
|
|
|
|
1 |
+
<?php if ( ! defined('ABSPATH') ) exit;
|
2 |
+
|
3 |
+
class GFParsi_PreSubmission {
|
|
|
|
|
|
|
4 |
|
5 |
private static $lead;
|
6 |
|
10 |
|
11 |
public static function replace_merge_tags( $form ) {
|
12 |
|
13 |
+
$current_page = isset(GFFormDisplay::$submission[$form['id']]) && isset(GFFormDisplay::$submission[$form['id']]['page_number']) ? GFFormDisplay::$submission[$form['id']]['page_number'] : 1;
|
14 |
$fields = array();
|
15 |
|
16 |
// get all HTML fields on the current page
|
151 |
// add filter that will handle getting temporary URLs for file uploads and post image fields (removed below)
|
152 |
// beware, the RGFormsModel::create_lead() function also triggers the gform_merge_tag_filter at some point and will
|
153 |
// result in an infinite loop if not called first above
|
154 |
+
add_filter('gform_merge_tag_filter', array('GFParsi_PreSubmission', 'preview_special_merge_tags'), 10, 4);
|
155 |
|
156 |
$content = GFCommon::replace_variables($content, $form, $lead, false, false, false);
|
157 |
|
158 |
// remove filter so this function is not applied after preview functionality is complete
|
159 |
+
remove_filter('gform_merge_tag_filter', array('GFParsi_PreSubmission', 'preview_special_merge_tags'));
|
160 |
|
161 |
return $content;
|
162 |
}
|
173 |
|
174 |
}
|
175 |
|
176 |
+
}
|
177 |
+
|
178 |
+
GFParsi_PreSubmission::init();
|
includes/class-snippets.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined( 'ABSPATH' ) ) exit;
|
2 |
+
|
3 |
+
//for user old plugin
|
4 |
+
class GravityFormsPersian extends GFParsi{}
|
5 |
+
|
6 |
+
class GFParsi_PostPermalink {
|
7 |
+
|
8 |
+
function __construct() {
|
9 |
+
add_filter('gform_custom_merge_tags', array($this, 'add_custom_merge_tag'), 10, 4);
|
10 |
+
add_filter('gform_replace_merge_tags', array($this, 'replace_merge_tag'), 10, 3);
|
11 |
+
}
|
12 |
+
|
13 |
+
function add_custom_merge_tag($merge_tags, $form_id, $fields, $element_id) {
|
14 |
+
if(!GFCommon::has_post_field($fields))
|
15 |
+
return $merge_tags;
|
16 |
+
$merge_tags[] = array('label' => __('Post Permalink', 'GF_FA') , 'tag' => '{post_permalink}');
|
17 |
+
return $merge_tags;
|
18 |
+
}
|
19 |
+
|
20 |
+
function replace_merge_tag($text, $form, $entry) {
|
21 |
+
|
22 |
+
$custom_merge_tag = '{post_permalink}';
|
23 |
+
if(strpos($text, $custom_merge_tag) === false || !rgar($entry, 'post_id'))
|
24 |
+
return $text;
|
25 |
+
|
26 |
+
$post_permalink = get_permalink(rgar($entry, 'post_id'));
|
27 |
+
$text = str_replace($custom_merge_tag, $post_permalink, $text);
|
28 |
+
|
29 |
+
return $text;
|
30 |
+
}
|
31 |
+
|
32 |
+
}
|
33 |
+
new GFParsi_PostPermalink();
|
34 |
+
|
35 |
+
|
36 |
+
add_filter('gform_pre_render', 'gfir_prepopluate_merge_tags');
|
37 |
+
function gfir_prepopluate_merge_tags($form) {
|
38 |
+
|
39 |
+
$filter_names = array();
|
40 |
+
|
41 |
+
foreach($form['fields'] as &$field) {
|
42 |
+
|
43 |
+
if(!rgar($field, 'allowsPrepopulate'))
|
44 |
+
continue;
|
45 |
+
|
46 |
+
// complex fields store inputName in the "name" property of the inputs array
|
47 |
+
if(is_array(rgar($field, 'inputs')) && $field['type'] != 'checkbox') {
|
48 |
+
foreach($field['inputs'] as $input) {
|
49 |
+
if(rgar($input, 'name'))
|
50 |
+
$filter_names[] = array('type' => $field['type'], 'name' => rgar($input, 'name'));
|
51 |
+
}
|
52 |
+
} else {
|
53 |
+
$filter_names[] = array('type' => $field['type'], 'name' => rgar($field, 'inputName'));
|
54 |
+
}
|
55 |
+
|
56 |
+
}
|
57 |
+
|
58 |
+
foreach($filter_names as $filter_name) {
|
59 |
+
|
60 |
+
$filtered_name = GFCommon::replace_variables_prepopulate($filter_name['name']);
|
61 |
+
|
62 |
+
if($filter_name['name'] == $filtered_name)
|
63 |
+
continue;
|
64 |
+
|
65 |
+
add_filter("gform_field_value_{$filter_name['name']}", create_function("", "return '$filtered_name';"));
|
66 |
+
}
|
67 |
+
|
68 |
+
return $form;
|
69 |
+
}
|
70 |
+
|
71 |
+
|
72 |
+
add_filter( 'gform_tabindex', 'gfir_gform_tabindexer', 10, 2 );
|
73 |
+
function gfir_gform_tabindexer( $tab_index, $form = false ) {
|
74 |
+
$starting_index = 1000; // if you need a higher tabindex, update this number
|
75 |
+
if( $form )
|
76 |
+
add_filter( 'gform_tabindex_' . $form['id'], 'gfir_gform_tabindexer' );
|
77 |
+
return GFCommon::$tab_index >= $starting_index ? GFCommon::$tab_index : $starting_index;
|
78 |
+
}
|
79 |
+
|
80 |
+
|
81 |
+
add_filter( 'gform_confirmation_anchor', '__return_true' );
|
includes/class-subtotal-calc.php
ADDED
@@ -0,0 +1,243 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined( 'ABSPATH' ) ) exit;
|
2 |
+
|
3 |
+
class GFParsi_CalcSubtotal {
|
4 |
+
|
5 |
+
public static $merge_tag = '{subtotal}';
|
6 |
+
|
7 |
+
function __construct() {
|
8 |
+
|
9 |
+
// front-end
|
10 |
+
add_filter( 'gform_pre_render', array( $this, 'maybe_replace_subtotal_merge_tag' ) );
|
11 |
+
add_filter( 'gform_pre_validation', array( $this, 'maybe_replace_subtotal_merge_tag_submission' ) );
|
12 |
+
|
13 |
+
// back-end
|
14 |
+
add_filter( 'gform_admin_pre_render', array( $this, 'add_merge_tags' ) );
|
15 |
+
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Look for {subtotal} merge tag in form fields 'calculationFormula' property. If found, replace with the
|
20 |
+
* aggregated subtotal merge tag string.
|
21 |
+
*
|
22 |
+
* @param mixed $form
|
23 |
+
*/
|
24 |
+
function maybe_replace_subtotal_merge_tag( $form, $filter_tags = false ) {
|
25 |
+
|
26 |
+
foreach( $form['fields'] as &$field ) {
|
27 |
+
|
28 |
+
if( current_filter() == 'gform_pre_render' && rgar( $field, 'origCalculationFormula' ) )
|
29 |
+
$field['calculationFormula'] = $field['origCalculationFormula'];
|
30 |
+
|
31 |
+
if( ! self::has_subtotal_merge_tag( $field ) )
|
32 |
+
continue;
|
33 |
+
|
34 |
+
$subtotal_merge_tags = self::get_subtotal_merge_tag_string( $form, $field, $filter_tags );
|
35 |
+
$field['origCalculationFormula'] = $field['calculationFormula'];
|
36 |
+
$field['calculationFormula'] = str_replace( self::$merge_tag, $subtotal_merge_tags, $field['calculationFormula'] );
|
37 |
+
|
38 |
+
}
|
39 |
+
|
40 |
+
return $form;
|
41 |
+
}
|
42 |
+
|
43 |
+
function maybe_replace_subtotal_merge_tag_submission( $form ) {
|
44 |
+
return $this->maybe_replace_subtotal_merge_tag( $form, true );
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get all the pricing fields on the form, get their corresponding merge tags and aggregate them into a formula that
|
49 |
+
* will yeild the form's subtotal.
|
50 |
+
*
|
51 |
+
* @param mixed $form
|
52 |
+
*/
|
53 |
+
static function get_subtotal_merge_tag_string( $form, $current_field, $filter_tags = false ) {
|
54 |
+
|
55 |
+
$pricing_fields = self::get_pricing_fields( $form );
|
56 |
+
$product_tag_groups = array();
|
57 |
+
|
58 |
+
foreach( $pricing_fields['products'] as $product ) {
|
59 |
+
|
60 |
+
$product_field = rgar( $product, 'product' );
|
61 |
+
$option_fields = rgar( $product, 'options' );
|
62 |
+
$quantity_field = rgar( $product, 'quantity' );
|
63 |
+
|
64 |
+
// do not include current field in subtotal
|
65 |
+
if( $product_field['id'] == $current_field['id'] )
|
66 |
+
continue;
|
67 |
+
|
68 |
+
$product_tags = GFCommon::get_field_merge_tags( $product_field );
|
69 |
+
$quantity_tag = 1;
|
70 |
+
|
71 |
+
// if a single product type, only get the "price" merge tag
|
72 |
+
if( in_array( GFFormsModel::get_input_type( $product_field ), array( 'singleproduct', 'calculation', 'hiddenproduct' ) ) ) {
|
73 |
+
|
74 |
+
// single products provide quantity merge tag
|
75 |
+
if( empty( $quantity_field ) && ! rgar( $product_field, 'disableQuantity' ) )
|
76 |
+
$quantity_tag = $product_tags[2]['tag'];
|
77 |
+
|
78 |
+
$product_tags = array( $product_tags[1] );
|
79 |
+
}
|
80 |
+
|
81 |
+
// if quantity field is provided for product, get merge tag
|
82 |
+
if( ! empty( $quantity_field ) ) {
|
83 |
+
$quantity_tag = GFCommon::get_field_merge_tags( $quantity_field );
|
84 |
+
$quantity_tag = $quantity_tag[0]['tag'];
|
85 |
+
}
|
86 |
+
|
87 |
+
if( $filter_tags && ! self::has_valid_quantity( $quantity_tag ) )
|
88 |
+
continue;
|
89 |
+
|
90 |
+
$product_tags = wp_list_pluck( $product_tags, 'tag' );
|
91 |
+
$option_tags = array();
|
92 |
+
|
93 |
+
foreach( $option_fields as $option_field ) {
|
94 |
+
|
95 |
+
if( is_array( $option_field['inputs'] ) ) {
|
96 |
+
|
97 |
+
$choice_number = 1;
|
98 |
+
|
99 |
+
foreach( $option_field['inputs'] as &$input ) {
|
100 |
+
|
101 |
+
//hack to skip numbers ending in 0. so that 5.1 doesn't conflict with 5.10
|
102 |
+
if( $choice_number % 10 == 0 )
|
103 |
+
$choice_number++;
|
104 |
+
|
105 |
+
$input['id'] = $option_field['id'] . '.' . $choice_number++;
|
106 |
+
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
$new_options_tags = GFCommon::get_field_merge_tags( $option_field );
|
111 |
+
if( ! is_array( $new_options_tags ) )
|
112 |
+
continue;
|
113 |
+
|
114 |
+
if( GFFormsModel::get_input_type( $option_field ) == 'checkbox' )
|
115 |
+
array_shift( $new_options_tags );
|
116 |
+
|
117 |
+
$option_tags = array_merge( $option_tags, $new_options_tags );
|
118 |
+
}
|
119 |
+
|
120 |
+
$option_tags = wp_list_pluck( $option_tags, 'tag' );
|
121 |
+
|
122 |
+
$product_tag_groups[] = '( ( ' . implode( ' + ', array_merge( $product_tags, $option_tags ) ) . ' ) * ' . $quantity_tag . ' )';
|
123 |
+
|
124 |
+
}
|
125 |
+
|
126 |
+
$shipping_tag = 0;
|
127 |
+
/* Shipping should not be included in subtotal, correct?
|
128 |
+
if( rgar( $pricing_fields, 'shipping' ) ) {
|
129 |
+
$shipping_tag = GFCommon::get_field_merge_tags( rgars( $pricing_fields, 'shipping/0' ) );
|
130 |
+
$shipping_tag = $shipping_tag[0]['tag'];
|
131 |
+
}*/
|
132 |
+
|
133 |
+
$pricing_tag_string = '( ( ' . implode( ' + ', $product_tag_groups ) . ' ) + ' . $shipping_tag . ' )';
|
134 |
+
|
135 |
+
return $pricing_tag_string;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Get all pricing fields from a given form object grouped by product and shipping with options nested under their
|
140 |
+
* respective products.
|
141 |
+
*
|
142 |
+
* @param mixed $form
|
143 |
+
*/
|
144 |
+
static function get_pricing_fields( $form ) {
|
145 |
+
|
146 |
+
$product_fields = array();
|
147 |
+
|
148 |
+
foreach( $form["fields"] as $field ) {
|
149 |
+
|
150 |
+
if( $field["type"] != 'product' )
|
151 |
+
continue;
|
152 |
+
|
153 |
+
$option_fields = GFCommon::get_product_fields_by_type($form, array("option"), $field['id'] );
|
154 |
+
|
155 |
+
// can only have 1 quantity field
|
156 |
+
$quantity_field = GFCommon::get_product_fields_by_type( $form, array("quantity"), $field['id'] );
|
157 |
+
$quantity_field = rgar( $quantity_field, 0 );
|
158 |
+
|
159 |
+
$product_fields[] = array(
|
160 |
+
'product' => $field,
|
161 |
+
'options' => $option_fields,
|
162 |
+
'quantity' => $quantity_field
|
163 |
+
);
|
164 |
+
|
165 |
+
}
|
166 |
+
|
167 |
+
$shipping_field = GFCommon::get_fields_by_type($form, array("shipping"));
|
168 |
+
|
169 |
+
return array( "products" => $product_fields, "shipping" => $shipping_field );
|
170 |
+
}
|
171 |
+
|
172 |
+
static function has_valid_quantity( $quantity_tag ) {
|
173 |
+
|
174 |
+
if( is_numeric( $quantity_tag ) ) {
|
175 |
+
|
176 |
+
$qty_value = $quantity_tag;
|
177 |
+
|
178 |
+
} else {
|
179 |
+
|
180 |
+
// extract qty input ID from the merge tag
|
181 |
+
preg_match_all( '/{[^{]*?:(\d+(\.\d+)?)(:(.*?))?}/mi', $quantity_tag, $matches, PREG_SET_ORDER );
|
182 |
+
$qty_input_id = rgars( $matches, '0/1' );
|
183 |
+
$qty_value = rgpost( 'input_' . str_replace( '.', '_', $qty_input_id ) );
|
184 |
+
|
185 |
+
}
|
186 |
+
|
187 |
+
return floatval( $qty_value ) > 0;
|
188 |
+
}
|
189 |
+
|
190 |
+
function add_merge_tags( $form ) {
|
191 |
+
|
192 |
+
$label = __('Subtotal', 'gravityforms');
|
193 |
+
|
194 |
+
?>
|
195 |
+
|
196 |
+
<script type="text/javascript">
|
197 |
+
|
198 |
+
// for the future (not yet supported for calc field)
|
199 |
+
gform.addFilter("gform_merge_tags", "gfircs_add_merge_tags");
|
200 |
+
function gfircs_add_merge_tags( mergeTags, elementId, hideAllFields, excludeFieldTypes, isPrepop, option ) {
|
201 |
+
mergeTags["pricing"].tags.push({ tag: '<?php echo self::$merge_tag; ?>', label: '<?php echo $label; ?>' });
|
202 |
+
return mergeTags;
|
203 |
+
}
|
204 |
+
|
205 |
+
// hacky, but only temporary
|
206 |
+
jQuery(document).ready(function($){
|
207 |
+
|
208 |
+
var calcMergeTagSelect = $('#field_calculation_formula_variable_select');
|
209 |
+
calcMergeTagSelect.find('optgroup').eq(0).append( '<option value="<?php echo self::$merge_tag; ?>"><?php echo $label; ?></option>' );
|
210 |
+
|
211 |
+
});
|
212 |
+
|
213 |
+
</script>
|
214 |
+
|
215 |
+
<?php
|
216 |
+
//return the form object from the php hook
|
217 |
+
return $form;
|
218 |
+
}
|
219 |
+
|
220 |
+
static function has_subtotal_merge_tag( $field ) {
|
221 |
+
|
222 |
+
// check if form is passed
|
223 |
+
if( isset( $field['fields'] ) ) {
|
224 |
+
|
225 |
+
$form = $field;
|
226 |
+
foreach( $form['fields'] as $field ) {
|
227 |
+
if( self::has_subtotal_merge_tag( $field ) )
|
228 |
+
return true;
|
229 |
+
}
|
230 |
+
|
231 |
+
} else {
|
232 |
+
|
233 |
+
if( isset( $field['calculationFormula'] ) && strpos( $field['calculationFormula'], self::$merge_tag ) !== false )
|
234 |
+
return true;
|
235 |
+
|
236 |
+
}
|
237 |
+
|
238 |
+
return false;
|
239 |
+
}
|
240 |
+
|
241 |
+
}
|
242 |
+
|
243 |
+
new GFParsi_CalcSubtotal();
|
includes/class-wp-session.php
ADDED
@@ -0,0 +1,284 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if( !defined( 'WP_SESSION_COOKIE' ) )
|
3 |
+
define( 'WP_SESSION_COOKIE', '_wp_session' );
|
4 |
+
|
5 |
+
if ( !class_exists( 'Recursive_ArrayAccess' ) ) {
|
6 |
+
|
7 |
+
class Recursive_ArrayAccess implements ArrayAccess {
|
8 |
+
|
9 |
+
protected $container = array();
|
10 |
+
protected $dirty = false;
|
11 |
+
|
12 |
+
protected function __construct( $data = array() ) {
|
13 |
+
foreach ( $data as $key => $value ) {
|
14 |
+
$this[ $key ] = $value;
|
15 |
+
}
|
16 |
+
}
|
17 |
+
|
18 |
+
public function __clone() {
|
19 |
+
|
20 |
+
foreach ( $this->container as $key => $value ) {
|
21 |
+
if ( $value instanceof self ) {
|
22 |
+
$this[ $key ] = clone $value;
|
23 |
+
}
|
24 |
+
}
|
25 |
+
}
|
26 |
+
|
27 |
+
public function toArray() {
|
28 |
+
$data = $this->container;
|
29 |
+
foreach ( $data as $key => $value ) {
|
30 |
+
if ( $value instanceof self ) {
|
31 |
+
$data[ $key ] = $value->toArray();
|
32 |
+
}
|
33 |
+
}
|
34 |
+
return $data;
|
35 |
+
}
|
36 |
+
|
37 |
+
public function offsetExists( $offset ) {
|
38 |
+
return isset( $this->container[ $offset ]) ;
|
39 |
+
}
|
40 |
+
|
41 |
+
public function offsetGet( $offset ) {
|
42 |
+
return isset( $this->container[ $offset ] ) ? $this->container[ $offset ] : null;
|
43 |
+
}
|
44 |
+
|
45 |
+
public function offsetSet( $offset, $data ) {
|
46 |
+
if ( is_array( $data ) ) {
|
47 |
+
$data = new self( $data );
|
48 |
+
}
|
49 |
+
|
50 |
+
if ( $offset === null ) {
|
51 |
+
$this->container[] = $data;
|
52 |
+
} else {
|
53 |
+
$this->container[ $offset ] = $data;
|
54 |
+
}
|
55 |
+
$this->dirty = true;
|
56 |
+
}
|
57 |
+
|
58 |
+
public function offsetUnset( $offset ) {
|
59 |
+
unset( $this->container[ $offset ] );
|
60 |
+
$this->dirty = true;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
if ( !class_exists( 'WP_Session' ) ) {
|
66 |
+
|
67 |
+
final class WP_Session extends Recursive_ArrayAccess implements Iterator, Countable {
|
68 |
+
|
69 |
+
protected $session_id;
|
70 |
+
protected $expires;
|
71 |
+
protected $exp_variant;
|
72 |
+
private static $instance = false;
|
73 |
+
|
74 |
+
public static function get_instance() {
|
75 |
+
|
76 |
+
if ( !self::$instance ) {
|
77 |
+
self::$instance = new self();
|
78 |
+
}
|
79 |
+
return self::$instance;
|
80 |
+
}
|
81 |
+
|
82 |
+
protected function __construct() {
|
83 |
+
|
84 |
+
if ( isset( $_COOKIE[WP_SESSION_COOKIE] ) ) {
|
85 |
+
|
86 |
+
$cookie = stripslashes( $_COOKIE[WP_SESSION_COOKIE] );
|
87 |
+
$cookie_crumbs = explode( '||', $cookie );
|
88 |
+
$this->session_id = $cookie_crumbs[0];
|
89 |
+
$this->expires = $cookie_crumbs[1];
|
90 |
+
$this->exp_variant = $cookie_crumbs[2];
|
91 |
+
if ( time() > $this->exp_variant ) {
|
92 |
+
$this->set_expiration();
|
93 |
+
delete_option( "_wp_session_expires_{$this->session_id}" );
|
94 |
+
add_option( "_wp_session_expires_{$this->session_id}", $this->expires, '', 'no' );
|
95 |
+
}
|
96 |
+
|
97 |
+
} else {
|
98 |
+
$this->session_id = $this->generate_id();
|
99 |
+
$this->set_expiration();
|
100 |
+
}
|
101 |
+
$this->read_data();
|
102 |
+
$this->set_cookie();
|
103 |
+
}
|
104 |
+
|
105 |
+
protected function set_expiration() {
|
106 |
+
$this->exp_variant = time() + (int) apply_filters( 'wp_session_expiration_variant', 24 * 60 );
|
107 |
+
$this->expires = time() + (int) apply_filters( 'wp_session_expiration', 30 * 60 );
|
108 |
+
}
|
109 |
+
|
110 |
+
protected function set_cookie(){
|
111 |
+
if( !headers_sent() )
|
112 |
+
setcookie(WP_SESSION_COOKIE,$this->session_id.'||'.$this->expires.'||'.$this->exp_variant,$this->expires,COOKIEPATH,COOKIE_DOMAIN );
|
113 |
+
}
|
114 |
+
|
115 |
+
protected function generate_id() {
|
116 |
+
require_once( ABSPATH . 'wp-includes/class-phpass.php');
|
117 |
+
$hasher = new PasswordHash( 8, false );
|
118 |
+
return md5( $hasher->get_random_bytes( 32 ) );
|
119 |
+
}
|
120 |
+
|
121 |
+
protected function read_data() {
|
122 |
+
$this->container = get_option( "_wp_session_{$this->session_id}", array() );
|
123 |
+
return $this->container;
|
124 |
+
}
|
125 |
+
|
126 |
+
public function write_data() {
|
127 |
+
$option_key = "_wp_session_{$this->session_id}";
|
128 |
+
if ( $this->dirty ) {
|
129 |
+
if ( false === get_option( $option_key ) ) {
|
130 |
+
add_option( "_wp_session_{$this->session_id}", $this->container, '', 'no' );
|
131 |
+
add_option( "_wp_session_expires_{$this->session_id}", $this->expires, '', 'no' );
|
132 |
+
} else {
|
133 |
+
delete_option( "_wp_session_{$this->session_id}" );
|
134 |
+
add_option( "_wp_session_{$this->session_id}", $this->container, '', 'no' );
|
135 |
+
}
|
136 |
+
}
|
137 |
+
}
|
138 |
+
|
139 |
+
public function json_out() {
|
140 |
+
return json_encode( $this->container );
|
141 |
+
}
|
142 |
+
|
143 |
+
public function json_in( $data ) {
|
144 |
+
$array = json_decode( $data );
|
145 |
+
if ( is_array( $array ) ) {
|
146 |
+
$this->container = $array;
|
147 |
+
return true;
|
148 |
+
}
|
149 |
+
return false;
|
150 |
+
}
|
151 |
+
|
152 |
+
public function regenerate_id( $delete_old = false ) {
|
153 |
+
|
154 |
+
if ( $delete_old ) {
|
155 |
+
delete_option( "_wp_session_{$this->session_id}" );
|
156 |
+
}
|
157 |
+
$this->session_id = $this->generate_id();
|
158 |
+
$this->set_cookie();
|
159 |
+
}
|
160 |
+
|
161 |
+
public function session_started() {
|
162 |
+
return !!self::$instance;
|
163 |
+
}
|
164 |
+
|
165 |
+
public function cache_expiration() {
|
166 |
+
return $this->expires;
|
167 |
+
}
|
168 |
+
|
169 |
+
public function reset() {
|
170 |
+
$this->container = array();
|
171 |
+
}
|
172 |
+
|
173 |
+
public function current() {
|
174 |
+
return current( $this->container );
|
175 |
+
}
|
176 |
+
|
177 |
+
public function key() {
|
178 |
+
return key( $this->container );
|
179 |
+
}
|
180 |
+
|
181 |
+
public function next() {
|
182 |
+
next( $this->container );
|
183 |
+
}
|
184 |
+
|
185 |
+
public function rewind() {
|
186 |
+
reset( $this->container );
|
187 |
+
}
|
188 |
+
|
189 |
+
public function valid() {
|
190 |
+
return $this->offsetExists( $this->key() );
|
191 |
+
}
|
192 |
+
|
193 |
+
public function count() {
|
194 |
+
return count( $this->container );
|
195 |
+
}
|
196 |
+
}
|
197 |
+
|
198 |
+
function wp_session_cache_expire() {
|
199 |
+
$wp_session = WP_Session::get_instance();
|
200 |
+
return $wp_session->cache_expiration();
|
201 |
+
}
|
202 |
+
|
203 |
+
function wp_session_commit() {
|
204 |
+
wp_session_write_close();
|
205 |
+
}
|
206 |
+
|
207 |
+
function wp_session_decode( $data ) {
|
208 |
+
$wp_session = WP_Session::get_instance();
|
209 |
+
return $wp_session->json_in( $data );
|
210 |
+
}
|
211 |
+
|
212 |
+
function wp_session_encode() {
|
213 |
+
$wp_session = WP_Session::get_instance();
|
214 |
+
return $wp_session->json_out();
|
215 |
+
}
|
216 |
+
|
217 |
+
function wp_session_regenerate_id( $delete_old_session = false ) {
|
218 |
+
$wp_session = WP_Session::get_instance();
|
219 |
+
$wp_session->regenerate_id( $delete_old_session );
|
220 |
+
return true;
|
221 |
+
}
|
222 |
+
|
223 |
+
function wp_session_start() {
|
224 |
+
$wp_session = WP_Session::get_instance();
|
225 |
+
do_action( 'wp_session_start' );
|
226 |
+
return $wp_session->session_started();
|
227 |
+
}
|
228 |
+
add_action( 'plugins_loaded', 'wp_session_start' );
|
229 |
+
|
230 |
+
function wp_session_status() {
|
231 |
+
$wp_session = WP_Session::get_instance();
|
232 |
+
if ( $wp_session->session_started() ) {
|
233 |
+
return PHP_SESSION_ACTIVE;
|
234 |
+
}
|
235 |
+
return PHP_SESSION_NONE;
|
236 |
+
}
|
237 |
+
|
238 |
+
function wp_session_unset() {
|
239 |
+
$wp_session = WP_Session::get_instance();
|
240 |
+
$wp_session->reset();
|
241 |
+
}
|
242 |
+
|
243 |
+
function wp_session_write_close() {
|
244 |
+
$wp_session = WP_Session::get_instance();
|
245 |
+
$wp_session->write_data();
|
246 |
+
do_action( 'wp_session_commit' );
|
247 |
+
}
|
248 |
+
add_action( 'shutdown', 'wp_session_write_close' );
|
249 |
+
|
250 |
+
function wp_session_cleanup() {
|
251 |
+
global $wpdb;
|
252 |
+
if ( defined( 'WP_SETUP_CONFIG' ) ) {
|
253 |
+
return;
|
254 |
+
}
|
255 |
+
|
256 |
+
if ( ! defined( 'WP_INSTALLING' ) ) {
|
257 |
+
$expiration_keys = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE '_wp_session_expires_%'" );
|
258 |
+
$now = time();
|
259 |
+
$expired_sessions = array();
|
260 |
+
foreach( $expiration_keys as $expiration ) {
|
261 |
+
if ( $now > intval( $expiration->option_value ) ) {
|
262 |
+
$session_id = substr( $expiration->option_name, 20 );
|
263 |
+
$expired_sessions[] = $expiration->option_name;
|
264 |
+
$expired_sessions[] = "_wp_session_$session_id";
|
265 |
+
}
|
266 |
+
}
|
267 |
+
|
268 |
+
if ( ! empty( $expired_sessions ) ) {
|
269 |
+
$option_names = implode( "','", $expired_sessions );
|
270 |
+
$wpdb->query( "DELETE FROM $wpdb->options WHERE option_name IN ('$option_names')" );
|
271 |
+
}
|
272 |
+
}
|
273 |
+
do_action( 'wp_session_cleanup' );
|
274 |
+
}
|
275 |
+
add_action( 'wp_session_garbage_collection', 'wp_session_cleanup' );
|
276 |
+
|
277 |
+
function wp_session_register_garbage_collection() {
|
278 |
+
if ( !wp_next_scheduled( 'wp_session_garbage_collection' ) ) {
|
279 |
+
wp_schedule_event( time(), 'hourly', 'wp_session_garbage_collection' );
|
280 |
+
}
|
281 |
+
}
|
282 |
+
add_action( 'wp', 'wp_session_register_garbage_collection' );
|
283 |
+
}
|
284 |
+
?>
|
includes/class-wpp-gravity-forms.php
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Makes GravityForms compatible with wp-parsidate plugin
|
4 |
+
*
|
5 |
+
* @package Persian-Gravity-Forms
|
6 |
+
* @author HANNANStd
|
7 |
+
*/
|
8 |
+
class WPP_GravityForms {
|
9 |
+
|
10 |
+
public static $instance = null;
|
11 |
+
|
12 |
+
public $font = 'yekan';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Returns an instance of class
|
16 |
+
*
|
17 |
+
* @return WPP_GravityForms
|
18 |
+
*/
|
19 |
+
public static function getInstance() {
|
20 |
+
if ( self::$instance == null )
|
21 |
+
self::$instance = new WPP_GravityForms();
|
22 |
+
|
23 |
+
return self::$instance;
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Hooks required tags
|
28 |
+
*/
|
29 |
+
public function __construct() {
|
30 |
+
|
31 |
+
if ( ! class_exists('GFCommon') ) {
|
32 |
+
return;
|
33 |
+
}
|
34 |
+
|
35 |
+
global $wpp_settings;
|
36 |
+
|
37 |
+
if ( !empty($wpp_settings) && $wpp_settings ) {
|
38 |
+
|
39 |
+
if ( ! isset( $wpp_settings[ 'droidsans_admin' ] ) || $wpp_settings[ 'droidsans_admin' ] != 'disable' ) {
|
40 |
+
|
41 |
+
add_filter( 'wpp_plugins_compability_settings', array( $this, 'add_settings' ) );
|
42 |
+
|
43 |
+
if ( ! isset( $wpp_settings['gravityforms_droidsans_admin'] ) || $wpp_settings['gravityforms_droidsans_admin'] != 'disable' ) {
|
44 |
+
$this->font = 'droidsans';
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
|
49 |
+
}
|
50 |
+
|
51 |
+
add_action('admin_enqueue_scripts', array( $this, 'admin_script' ));
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Adds desired fonts
|
56 |
+
*/
|
57 |
+
public function admin_script() {
|
58 |
+
|
59 |
+
if ( is_rtl() && $this->is_gravity_page() ) {
|
60 |
+
wp_register_style( 'gravity-forms-admin-' . $this->font , GF_PARSI_URL . 'assets/css/font.' . $this->font . '.css' );
|
61 |
+
wp_enqueue_style( 'gravity-forms-admin-' . $this->font );
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Checks is gravityforms page
|
68 |
+
*
|
69 |
+
*/
|
70 |
+
public function is_gravity_page() {
|
71 |
+
|
72 |
+
if ( !class_exists('RGForms') )
|
73 |
+
return false;
|
74 |
+
|
75 |
+
$current_page = trim(strtolower(RGForms::get("page")));
|
76 |
+
return ( substr( $current_page , 0 , 2) == 'gf' || stripos( $current_page, 'gravity' ) !== false );
|
77 |
+
}
|
78 |
+
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Adds settings for toggle fixing
|
82 |
+
*
|
83 |
+
* @param array $old_settings Old settings
|
84 |
+
* @return array New settings
|
85 |
+
*/
|
86 |
+
public function add_settings( $old_settings ) {
|
87 |
+
|
88 |
+
$options = array(
|
89 |
+
'enable' => __( 'Enable', 'wp-parsidate' ),
|
90 |
+
'disable' => __( 'Disable', 'wp-parsidate' )
|
91 |
+
);
|
92 |
+
|
93 |
+
$settings = array(
|
94 |
+
'gravityforms' => array(
|
95 |
+
'id' => 'gravityforms',
|
96 |
+
'name' => __( 'GravityForms', 'GF_FA' ),
|
97 |
+
'type' => 'header'
|
98 |
+
),
|
99 |
+
'gravityforms_droidsans_admin' => array(
|
100 |
+
'id' => 'gravityforms_droidsans_admin',
|
101 |
+
'name' => __( 'Use Droid Sans font for GravityForms Admin', 'GF_FA' ),
|
102 |
+
'type' => 'radio',
|
103 |
+
'options' => $options,
|
104 |
+
'std' => 'enable',
|
105 |
+
'desc' => __( 'By GravityForms.ir', 'GF_FA' )
|
106 |
+
),
|
107 |
+
);
|
108 |
+
|
109 |
+
return array_merge( $old_settings, $settings );
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
add_action('plugins_loaded', 'wpp_gravity_forms', 0);
|
114 |
+
function wpp_gravity_forms() {
|
115 |
+
WPP_GravityForms::getInstance();
|
116 |
+
}
|
index.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Persian Gravity Forms
|
4 |
+
Plugin URI: https://wordpress.org/plugins/persian-gravity-forms/
|
5 |
+
Description: Gravity Forms for Iranian, This plugin extends the Gravity Forms and its addons with Persian language
|
6 |
+
Version: 2.0.0
|
7 |
+
Requires at least: 4.0
|
8 |
+
Author: hannansoft
|
9 |
+
Author URI: http://www.gravityforms.ir/
|
10 |
+
Text Domain: GF_FA
|
11 |
+
Domain Path: /languages/
|
12 |
+
License: GPL 2
|
13 |
+
*/
|
14 |
+
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
16 |
+
|
17 |
+
if ( ! defined( 'GF_PARSI_VERSION' ) )
|
18 |
+
define('GF_PARSI_VERSION', '2.0.0' );
|
19 |
+
|
20 |
+
if ( ! defined( 'GF_PARSI_URL' ) )
|
21 |
+
define('GF_PARSI_URL', plugins_url('', __FILE__) . '/' );
|
22 |
+
|
23 |
+
if ( ! defined( 'GF_PARSI_DIR' ) )
|
24 |
+
define( 'GF_PARSI_DIR', plugin_dir_path( __FILE__ ) );
|
25 |
+
|
26 |
+
load_plugin_textdomain( 'GF_FA', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
27 |
+
|
28 |
+
include GF_PARSI_DIR . '/persian-gravity.php';
|
languages/GF_FA-fa_IR.mo
ADDED
Binary file
|
languages/GF_FA-fa_IR.po
ADDED
@@ -0,0 +1,647 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Persian Gravity Forms v2.0.0\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2016-03-02 05:18:06+0330\n"
|
7 |
+
"Last-Translator: hannanstd <hannanstd@gmail.com>\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: Farsi\n"
|
15 |
+
"X-Poedit-Country: IRAN\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 |
+
#: includes/class-iran-cities.php:30
|
24 |
+
#@ GF_FA
|
25 |
+
msgid "Azarbaijan - East"
|
26 |
+
msgstr "آذربایجان شرقی"
|
27 |
+
|
28 |
+
#: includes/class-iran-cities.php:31
|
29 |
+
#@ GF_FA
|
30 |
+
msgid "Azarbaijan - West"
|
31 |
+
msgstr "آذربایجان غربی"
|
32 |
+
|
33 |
+
#: includes/class-iran-cities.php:32
|
34 |
+
#@ GF_FA
|
35 |
+
msgid "Ardabil"
|
36 |
+
msgstr "اردبیل"
|
37 |
+
|
38 |
+
#: includes/class-iran-cities.php:33
|
39 |
+
#@ GF_FA
|
40 |
+
msgid "Isfahan"
|
41 |
+
msgstr "اصفهان"
|
42 |
+
|
43 |
+
#: includes/class-iran-cities.php:34
|
44 |
+
#@ GF_FA
|
45 |
+
msgid "Alborz"
|
46 |
+
msgstr "البرز"
|
47 |
+
|
48 |
+
#: includes/class-iran-cities.php:35
|
49 |
+
#@ GF_FA
|
50 |
+
msgid "Ilam"
|
51 |
+
msgstr "ایلام"
|
52 |
+
|
53 |
+
#: includes/class-iran-cities.php:36
|
54 |
+
#@ GF_FA
|
55 |
+
msgid "Bushehr"
|
56 |
+
msgstr "بوشهر"
|
57 |
+
|
58 |
+
#: includes/class-iran-cities.php:37
|
59 |
+
#@ GF_FA
|
60 |
+
msgid "Tehran"
|
61 |
+
msgstr "تهران"
|
62 |
+
|
63 |
+
#: includes/class-iran-cities.php:38
|
64 |
+
#@ GF_FA
|
65 |
+
msgid "Chahar Mahaal and Bakhtiari"
|
66 |
+
msgstr "چهارمحال و بختیاری"
|
67 |
+
|
68 |
+
#: includes/class-iran-cities.php:39
|
69 |
+
#@ GF_FA
|
70 |
+
msgid "Khorasan - South"
|
71 |
+
msgstr "خراسان جنوبی"
|
72 |
+
|
73 |
+
#: includes/class-iran-cities.php:40
|
74 |
+
#@ GF_FA
|
75 |
+
msgid "Khorasan - Razavi"
|
76 |
+
msgstr "خراسان رضوی"
|
77 |
+
|
78 |
+
#: includes/class-iran-cities.php:41
|
79 |
+
#@ GF_FA
|
80 |
+
msgid "Khorasan - North"
|
81 |
+
msgstr "خراسان شمالی"
|
82 |
+
|
83 |
+
#: includes/class-iran-cities.php:42
|
84 |
+
#@ GF_FA
|
85 |
+
msgid "Khuzestan"
|
86 |
+
msgstr "خوزستان"
|
87 |
+
|
88 |
+
#: includes/class-iran-cities.php:43
|
89 |
+
#@ GF_FA
|
90 |
+
msgid "Zanjan"
|
91 |
+
msgstr "زنجان"
|
92 |
+
|
93 |
+
#: includes/class-iran-cities.php:44
|
94 |
+
#@ GF_FA
|
95 |
+
msgid "Semnan"
|
96 |
+
msgstr "سمنان"
|
97 |
+
|
98 |
+
#: includes/class-iran-cities.php:45
|
99 |
+
#@ GF_FA
|
100 |
+
msgid "Sistan and Baluchistan"
|
101 |
+
msgstr "سیستان و بلوچستان"
|
102 |
+
|
103 |
+
#: includes/class-iran-cities.php:46
|
104 |
+
#@ GF_FA
|
105 |
+
msgid "Fars"
|
106 |
+
msgstr "فارس"
|
107 |
+
|
108 |
+
#: includes/class-iran-cities.php:47
|
109 |
+
#@ GF_FA
|
110 |
+
msgid "Qazvin"
|
111 |
+
msgstr "قزوین"
|
112 |
+
|
113 |
+
#: includes/class-iran-cities.php:48
|
114 |
+
#@ GF_FA
|
115 |
+
msgid "Qom"
|
116 |
+
msgstr "قم"
|
117 |
+
|
118 |
+
#: includes/class-iran-cities.php:49
|
119 |
+
#@ GF_FA
|
120 |
+
msgid "Kurdistan"
|
121 |
+
msgstr "کردستان"
|
122 |
+
|
123 |
+
#: includes/class-iran-cities.php:50
|
124 |
+
#@ GF_FA
|
125 |
+
msgid "Kerman"
|
126 |
+
msgstr "کرمان"
|
127 |
+
|
128 |
+
#: includes/class-iran-cities.php:51
|
129 |
+
#@ GF_FA
|
130 |
+
msgid "Kermanshah"
|
131 |
+
msgstr "کرمانشاه"
|
132 |
+
|
133 |
+
#: includes/class-iran-cities.php:52
|
134 |
+
#@ GF_FA
|
135 |
+
msgid "Kohgiluyeh and Boyer-Ahmad"
|
136 |
+
msgstr "کهگیلویه و بویراحمد"
|
137 |
+
|
138 |
+
#: includes/class-iran-cities.php:53
|
139 |
+
#@ GF_FA
|
140 |
+
msgid "Golestan"
|
141 |
+
msgstr "گلستان"
|
142 |
+
|
143 |
+
#: includes/class-iran-cities.php:54
|
144 |
+
#@ GF_FA
|
145 |
+
msgid "Guilan"
|
146 |
+
msgstr "گیلان"
|
147 |
+
|
148 |
+
#: includes/class-iran-cities.php:55
|
149 |
+
#@ GF_FA
|
150 |
+
msgid "Lorestan"
|
151 |
+
msgstr "لرستان"
|
152 |
+
|
153 |
+
#: includes/class-iran-cities.php:56
|
154 |
+
#@ GF_FA
|
155 |
+
msgid "Mazandaran"
|
156 |
+
msgstr "مازندران"
|
157 |
+
|
158 |
+
#: includes/class-iran-cities.php:57
|
159 |
+
#@ GF_FA
|
160 |
+
msgid "Markazi"
|
161 |
+
msgstr "مرکزی"
|
162 |
+
|
163 |
+
#: includes/class-iran-cities.php:58
|
164 |
+
#@ GF_FA
|
165 |
+
msgid "Hormozgān"
|
166 |
+
msgstr "هرمزگان"
|
167 |
+
|
168 |
+
#: includes/class-iran-cities.php:59
|
169 |
+
#@ GF_FA
|
170 |
+
msgid "Hamadan"
|
171 |
+
msgstr "همدان"
|
172 |
+
|
173 |
+
#: includes/class-iran-cities.php:60
|
174 |
+
#@ GF_FA
|
175 |
+
msgid "Yazd"
|
176 |
+
msgstr "یزد"
|
177 |
+
|
178 |
+
#: includes/class-iran-cities.php:69
|
179 |
+
#@ GF_FA
|
180 |
+
msgid "Postal Code"
|
181 |
+
msgstr "کد پستی"
|
182 |
+
|
183 |
+
#: includes/class-iran-cities.php:70
|
184 |
+
#@ GF_FA
|
185 |
+
msgid "Province"
|
186 |
+
msgstr "استان"
|
187 |
+
|
188 |
+
#: includes/class-iran-cities.php:78
|
189 |
+
#@ GF_FA
|
190 |
+
msgid "Provinces of Iran"
|
191 |
+
msgstr "استان های ایران"
|
192 |
+
|
193 |
+
#: includes/class-iran-cities.php:101
|
194 |
+
#@ GF_FA
|
195 |
+
msgid "Activate Iran Cities"
|
196 |
+
msgstr "فعالسازی شهرهای ایران"
|
197 |
+
|
198 |
+
#: includes/class-jalali-date.php:40
|
199 |
+
#@ GF_FA
|
200 |
+
msgid "Activate Jalali date"
|
201 |
+
msgstr "فعالسازی تاریخ شمسی"
|
202 |
+
|
203 |
+
#: includes/class-jalali-date.php:261
|
204 |
+
#, php-format
|
205 |
+
#@ gravityforms
|
206 |
+
msgid "Please enter a valid date in the format (%s)."
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: includes/class-jalali-date.php:261
|
210 |
+
#@ gravityforms
|
211 |
+
msgid "Please enter a valid date."
|
212 |
+
msgstr ""
|
213 |
+
|
214 |
+
#: includes/class-live-preview.php:30
|
215 |
+
#: includes/class-live-preview.php:46
|
216 |
+
#@ GF_FA
|
217 |
+
msgid "Form Preview"
|
218 |
+
msgstr "پیش نمایش فرم"
|
219 |
+
|
220 |
+
#: includes/class-live-preview.php:31
|
221 |
+
#@ GF_FA
|
222 |
+
msgid "A post type created for previewing Gravity Forms forms on the frontend."
|
223 |
+
msgstr "یک پست تایپ موقتی و تستی جهت نمایش پیشنمایش فرم"
|
224 |
+
|
225 |
+
#: includes/class-live-preview.php:86
|
226 |
+
#: includes/class-live-preview.php:130
|
227 |
+
#@ GF_FA
|
228 |
+
msgid "Ajax option enabled"
|
229 |
+
msgstr "حالت فعال آیجکس"
|
230 |
+
|
231 |
+
#: includes/class-live-preview.php:92
|
232 |
+
#: includes/class-live-preview.php:131
|
233 |
+
#@ GF_FA
|
234 |
+
msgid "Ajax option disabled"
|
235 |
+
msgstr "حالت غیرفعال آیجکس"
|
236 |
+
|
237 |
+
#: includes/class-live-preview.php:97
|
238 |
+
#: includes/class-live-preview.php:99
|
239 |
+
#: includes/class-live-preview.php:127
|
240 |
+
#@ GF_FA
|
241 |
+
msgid "Live Preview"
|
242 |
+
msgstr "پیش نمایش زنده"
|
243 |
+
|
244 |
+
#: includes/class-live-preview.php:155
|
245 |
+
#@ GF_FA
|
246 |
+
msgid "You need to log in to preview forms."
|
247 |
+
msgstr "برای مشاهده فرم می بایست وارد سایت شوید!"
|
248 |
+
|
249 |
+
#: includes/class-live-preview.php:158
|
250 |
+
#@ GF_FA
|
251 |
+
msgid "Oops! It doesn't look like you have the necessary permission to preview this form."
|
252 |
+
msgstr "شما مجوز کافی جهت مشاهده پیشنمایش فرم را ندارید!"
|
253 |
+
|
254 |
+
#: includes/class-melli-code.php:64
|
255 |
+
#@ GF_FA
|
256 |
+
msgid "<h6>نمایش لحظه ای شهر از روی کد ملی </h6>نمایش شهر و پیغام زیر فیلد کد ملی بعد از پر شدن فیلد . تذکر : در صورتی که این گزینه را فعال نمایید ،ممکن است فراخوانی شهر های ایران با توجه به زیاد بودن آنها سبب سنگین شدن صفحه گردد."
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: includes/class-melli-code.php:65
|
260 |
+
#@ GF_FA
|
261 |
+
msgid "<h6>جدا سازی ارقام</h6>در صورتی که این گزینه را فعال نمایید ، پس از پر شدن فیلد کد ملی ، <strong>در صورتی که کد ملی وارد شده صحیح تشخصی داده شود</strong> ؛ کد ملی به صورت زیر در خواهد آمد و در غیر این صورت علی صحیح نبودن کد ملی زیر فیلد نمایش داده خواهد شد :<br>xxx-xxxxxx-x"
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: includes/class-melli-code.php:68
|
265 |
+
#@ GF_FA
|
266 |
+
msgid "در صورتی که از تب وِیژگی تیک گزینه بدون تکرار را زده باشید ؛ بعد از پر شدن فرم و زدن دکمه ارسال پیغامی مبتنی بر تکراری بودن کد ملی نمایش داده خواهد شد . <br/>پیغام پیشفرض : این کد ملی توسط فرد دیگری ثبت شده است ."
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
+
#: includes/class-melli-code.php:69
|
270 |
+
#@ GF_FA
|
271 |
+
msgid "در صورتی که کد ملی وارد شده مطابق با الگوریتم کشور نباشد پیغام خطا نمایش داده خواهد شد .<br/>پیغام پیشفرض : کد ملی وارد شده مطابق با استانداردهای کشور نمی باشد ."
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: includes/class-melli-code.php:165
|
275 |
+
#@ GF_FA
|
276 |
+
msgid "نمایش شهر بر اساس کد ملی"
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: includes/class-melli-code.php:173
|
280 |
+
#@ GF_FA
|
281 |
+
msgid "جدا سازی خودکار ارقام توسط خط فاصله"
|
282 |
+
msgstr ""
|
283 |
+
|
284 |
+
#: includes/class-melli-code.php:181
|
285 |
+
#@ GF_FA
|
286 |
+
msgid "پیغام زمانی که مقدار وارد شده شامل کاراکتر غیر عددی باشد"
|
287 |
+
msgstr ""
|
288 |
+
|
289 |
+
#: includes/class-melli-code.php:190
|
290 |
+
#@ GF_FA
|
291 |
+
msgid "پیغام زمانیکه تعداد ارقام وارد شده استاندارد نباشد"
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: includes/class-melli-code.php:199
|
295 |
+
#@ GF_FA
|
296 |
+
msgid "پیغام زمانیکه کد ملی وارد شده قبلا ثبت شده باشد"
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: includes/class-melli-code.php:208
|
300 |
+
#@ GF_FA
|
301 |
+
msgid "پیغام زمانیکه کد ملی وارد شده مطابق با الگوی ملی نباشد"
|
302 |
+
msgstr ""
|
303 |
+
|
304 |
+
#: includes/class-melli-code.php:294
|
305 |
+
#: includes/class-melli-code.php:392
|
306 |
+
#@ GF_FA
|
307 |
+
msgid "کد ملی فقط باید به صورت عدد وارد شود ."
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: includes/class-melli-code.php:297
|
311 |
+
#@ GF_FA
|
312 |
+
msgid "کد ملی می بایست 10 رقمی باشد ."
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: includes/class-melli-code.php:300
|
316 |
+
#: includes/class-melli-code.php:406
|
317 |
+
#@ GF_FA
|
318 |
+
msgid "کد ملی وارد شده مطابق با استانداردهای کشور نمی باشد ."
|
319 |
+
msgstr ""
|
320 |
+
|
321 |
+
#: includes/class-melli-code.php:421
|
322 |
+
#@ GF_FA
|
323 |
+
msgid "این کد ملی توسط فرد دیگری ثبت شده است ."
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: includes/class-news-letter.php:24
|
327 |
+
#@ GF_FA
|
328 |
+
msgid "Newsletter"
|
329 |
+
msgstr "خبرنامه"
|
330 |
+
|
331 |
+
#: includes/class-pre-submission.php:128
|
332 |
+
#@ gravityforms
|
333 |
+
msgid "Click to view"
|
334 |
+
msgstr ""
|
335 |
+
|
336 |
+
#: includes/class-snippets.php:16
|
337 |
+
#@ GF_FA
|
338 |
+
msgid "Post Permalink"
|
339 |
+
msgstr "لینک پست"
|
340 |
+
|
341 |
+
#: includes/class-subtotal-calc.php:192
|
342 |
+
#@ gravityforms
|
343 |
+
msgid "Subtotal"
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: includes/class-wpp-gravity-forms.php:89
|
347 |
+
#@ wp-parsidate
|
348 |
+
msgid "Enable"
|
349 |
+
msgstr ""
|
350 |
+
|
351 |
+
#: includes/class-wpp-gravity-forms.php:90
|
352 |
+
#@ wp-parsidate
|
353 |
+
msgid "Disable"
|
354 |
+
msgstr ""
|
355 |
+
|
356 |
+
#: includes/class-wpp-gravity-forms.php:96
|
357 |
+
#@ GF_FA
|
358 |
+
msgid "GravityForms"
|
359 |
+
msgstr "گراویتی فرم"
|
360 |
+
|
361 |
+
#: includes/class-wpp-gravity-forms.php:101
|
362 |
+
#@ GF_FA
|
363 |
+
msgid "Use Droid Sans font for GravityForms Admin"
|
364 |
+
msgstr "استفاده از قلم \"دروید سنس\"برای مدیریت بجای فونت \"یکان\""
|
365 |
+
|
366 |
+
#: includes/class-wpp-gravity-forms.php:105
|
367 |
+
#@ GF_FA
|
368 |
+
msgid "By GravityForms.ir"
|
369 |
+
msgstr "اضافه شده توسط گراویتی فرم پارسی"
|
370 |
+
|
371 |
+
#. translators: plugin header field 'Name'
|
372 |
+
#: index.php:0
|
373 |
+
#@ GF_FA
|
374 |
+
msgid "Persian Gravity Forms"
|
375 |
+
msgstr "گراویتی فرم پارسی"
|
376 |
+
|
377 |
+
#. translators: plugin header field 'PluginURI'
|
378 |
+
#: index.php:0
|
379 |
+
#@ GF_FA
|
380 |
+
msgid "https://wordpress.org/plugins/persian-gravity-forms/"
|
381 |
+
msgstr "https://wordpress.org/plugins/persian-gravity-forms/"
|
382 |
+
|
383 |
+
#. translators: plugin header field 'Author'
|
384 |
+
#: index.php:0
|
385 |
+
#@ GF_FA
|
386 |
+
msgid "hannansoft"
|
387 |
+
msgstr "حنان ابراهیمی ستوده"
|
388 |
+
|
389 |
+
#. translators: plugin header field 'AuthorURI'
|
390 |
+
#: index.php:0
|
391 |
+
#@ GF_FA
|
392 |
+
msgid "http://www.gravityforms.ir/"
|
393 |
+
msgstr "http://www.gravityforms.ir/"
|
394 |
+
|
395 |
+
#. translators: plugin header field 'Version'
|
396 |
+
#: index.php:0
|
397 |
+
#@ GF_FA
|
398 |
+
msgid "2.0.0"
|
399 |
+
msgstr "2.0.0"
|
400 |
+
|
401 |
+
#: persian-gravity.php:95
|
402 |
+
#, php-format
|
403 |
+
#@ GF_FA
|
404 |
+
msgid "Persian Gravity Forms requires Gravityforms Core. Please install or activate it to continue. %sSee FAQ%s"
|
405 |
+
msgstr "شما تنها بسته فارسی ساز را نصب کرده اید! برای استفاده از گراویتی فرم باید هسته اصلی نیز نصب باشد. %sاطلاعات بیشتر%s"
|
406 |
+
|
407 |
+
#: persian-gravity.php:134
|
408 |
+
#, php-format
|
409 |
+
#@ GF_FA
|
410 |
+
msgid "Thanks for choosing %sPersian Gravity Forms%s"
|
411 |
+
msgstr "از اینکه %sگراویتی فرم پارسی%s را انتخاب کردید متشکریم!"
|
412 |
+
|
413 |
+
#: persian-gravity.php:192
|
414 |
+
#@ GF_FA
|
415 |
+
msgid "Persian Gravity Forms Dashboard"
|
416 |
+
msgstr "آخرین مطالب گراویتی فرم پارسی"
|
417 |
+
|
418 |
+
#: persian-gravity.php:201
|
419 |
+
#@ GF_FA
|
420 |
+
msgid "<strong>RSS Error</strong>"
|
421 |
+
msgstr "<strong>خطای RSS</strong>"
|
422 |
+
|
423 |
+
#: persian-gravity.php:206
|
424 |
+
#@ GF_FA
|
425 |
+
msgid "Apparently, There are no updates to show!"
|
426 |
+
msgstr "هیچ مطلبی وجود ندارد!"
|
427 |
+
|
428 |
+
#: persian-gravity.php:415
|
429 |
+
#@ GF_FA
|
430 |
+
msgid "Private"
|
431 |
+
msgstr "Private"
|
432 |
+
|
433 |
+
#: persian-gravity.php:423
|
434 |
+
#@ GF_FA
|
435 |
+
msgid "Iranian Rial"
|
436 |
+
msgstr "ریال"
|
437 |
+
|
438 |
+
#: persian-gravity.php:424
|
439 |
+
#: persian-gravity.php:425
|
440 |
+
#@ GF_FA
|
441 |
+
msgid "Rial"
|
442 |
+
msgstr "ریال"
|
443 |
+
|
444 |
+
#: persian-gravity.php:435
|
445 |
+
#@ GF_FA
|
446 |
+
msgid "Iranian Toman"
|
447 |
+
msgstr "تومان"
|
448 |
+
|
449 |
+
#: persian-gravity.php:436
|
450 |
+
#: persian-gravity.php:437
|
451 |
+
#@ GF_FA
|
452 |
+
msgid "Toman"
|
453 |
+
msgstr "تومان"
|
454 |
+
|
455 |
+
#: persian-gravity.php:450
|
456 |
+
#@ GF_FA
|
457 |
+
msgid "Iranian Months"
|
458 |
+
msgstr "ماه های ایران"
|
459 |
+
|
460 |
+
#: persian-gravity.php:451
|
461 |
+
#@ GF_FA
|
462 |
+
msgid "Farvardin"
|
463 |
+
msgstr "فروردین"
|
464 |
+
|
465 |
+
#: persian-gravity.php:452
|
466 |
+
#@ GF_FA
|
467 |
+
msgid "Ordibehesht"
|
468 |
+
msgstr "اردیبهشت"
|
469 |
+
|
470 |
+
#: persian-gravity.php:453
|
471 |
+
#@ GF_FA
|
472 |
+
msgid "Khordad"
|
473 |
+
msgstr "خرداد"
|
474 |
+
|
475 |
+
#: persian-gravity.php:454
|
476 |
+
#@ GF_FA
|
477 |
+
msgid "Tir"
|
478 |
+
msgstr "تیر"
|
479 |
+
|
480 |
+
#: persian-gravity.php:455
|
481 |
+
#@ GF_FA
|
482 |
+
msgid "Mordad"
|
483 |
+
msgstr "مرداد"
|
484 |
+
|
485 |
+
#: persian-gravity.php:456
|
486 |
+
#@ GF_FA
|
487 |
+
msgid "Shahrivar"
|
488 |
+
msgstr "شهریور"
|
489 |
+
|
490 |
+
#: persian-gravity.php:457
|
491 |
+
#@ GF_FA
|
492 |
+
msgid "Mehr"
|
493 |
+
msgstr "مهر"
|
494 |
+
|
495 |
+
#: persian-gravity.php:458
|
496 |
+
#@ GF_FA
|
497 |
+
msgid "Aban"
|
498 |
+
msgstr "آبان"
|
499 |
+
|
500 |
+
#: persian-gravity.php:459
|
501 |
+
#@ GF_FA
|
502 |
+
msgid "Azar"
|
503 |
+
msgstr "آذر"
|
504 |
+
|
505 |
+
#: persian-gravity.php:460
|
506 |
+
#@ GF_FA
|
507 |
+
msgid "Dey"
|
508 |
+
msgstr "دی"
|
509 |
+
|
510 |
+
#: persian-gravity.php:461
|
511 |
+
#@ GF_FA
|
512 |
+
msgid "Bahman"
|
513 |
+
msgstr "بهمن"
|
514 |
+
|
515 |
+
#: persian-gravity.php:462
|
516 |
+
#@ GF_FA
|
517 |
+
msgid "Esfand"
|
518 |
+
msgstr "اسفند"
|
519 |
+
|
520 |
+
#: persian-gravity.php:471
|
521 |
+
#@ GF_FA
|
522 |
+
msgid "Simple Payment Gateway"
|
523 |
+
msgstr "عنوان درگاه پرداخت ساده"
|
524 |
+
|
525 |
+
#: persian-gravity.php:472
|
526 |
+
#@ GF_FA
|
527 |
+
msgid "Simple Payment Status"
|
528 |
+
msgstr "وضعیت پرداخت ساده"
|
529 |
+
|
530 |
+
#: persian-gravity.php:473
|
531 |
+
#@ GF_FA
|
532 |
+
msgid "Simple Transaction ID"
|
533 |
+
msgstr "شماره تراکنش ساده"
|
534 |
+
|
535 |
+
#: persian-gravity.php:474
|
536 |
+
#@ GF_FA
|
537 |
+
msgid "Styled Payment Gateway"
|
538 |
+
msgstr "جدول نام درگاه پرداخت"
|
539 |
+
|
540 |
+
#: persian-gravity.php:475
|
541 |
+
#@ GF_FA
|
542 |
+
msgid "Styled Payment Status"
|
543 |
+
msgstr "جدول وضعیت پرداخت"
|
544 |
+
|
545 |
+
#: persian-gravity.php:476
|
546 |
+
#@ GF_FA
|
547 |
+
msgid "Styled Transaction ID"
|
548 |
+
msgstr "جدول شماره تراکنش"
|
549 |
+
|
550 |
+
#: persian-gravity.php:477
|
551 |
+
#@ GF_FA
|
552 |
+
msgid "Styled Payment Pack"
|
553 |
+
msgstr "پک پرداخت"
|
554 |
+
|
555 |
+
#: persian-gravity.php:478
|
556 |
+
#@ GF_FA
|
557 |
+
msgid "Start of RTL Div"
|
558 |
+
msgstr "ابتدای بلوک راستچین ساز"
|
559 |
+
|
560 |
+
#: persian-gravity.php:479
|
561 |
+
#@ GF_FA
|
562 |
+
msgid "End of RTL Div"
|
563 |
+
msgstr "انتهای بلوک راستچین ساز"
|
564 |
+
|
565 |
+
#: persian-gravity.php:535
|
566 |
+
#: persian-gravity.php:643
|
567 |
+
#@ GF_FA
|
568 |
+
msgid "Approved"
|
569 |
+
msgstr "موفق"
|
570 |
+
|
571 |
+
#: persian-gravity.php:539
|
572 |
+
#: persian-gravity.php:647
|
573 |
+
#@ GF_FA
|
574 |
+
msgid "Failed"
|
575 |
+
msgstr "ناموفق"
|
576 |
+
|
577 |
+
#: persian-gravity.php:543
|
578 |
+
#: persian-gravity.php:651
|
579 |
+
#@ GF_FA
|
580 |
+
msgid "Cancelled"
|
581 |
+
msgstr "منصرف شده"
|
582 |
+
|
583 |
+
#: persian-gravity.php:547
|
584 |
+
#: persian-gravity.php:655
|
585 |
+
#@ GF_FA
|
586 |
+
msgid "Processing"
|
587 |
+
msgstr "در انتظار"
|
588 |
+
|
589 |
+
#: persian-gravity.php:554
|
590 |
+
#@ GF_FA
|
591 |
+
msgid "Payment Gateway"
|
592 |
+
msgstr "عنوان درگاه پرداخت"
|
593 |
+
|
594 |
+
#: persian-gravity.php:567
|
595 |
+
#@ GF_FA
|
596 |
+
msgid "Transaction ID"
|
597 |
+
msgstr "شماره تراکنش"
|
598 |
+
|
599 |
+
#: persian-gravity.php:580
|
600 |
+
#@ GF_FA
|
601 |
+
msgid "Payment Status"
|
602 |
+
msgstr "وضعیت پرداخت"
|
603 |
+
|
604 |
+
#: includes/class-iran-cities.php:23
|
605 |
+
#@ GF_FA
|
606 |
+
msgid "<h6>فعالسازی شهر های ایرانی</h6>برای فعالسازی انتخابگر لیست شهر های ایران می بایست نوع آدرس بر روی \"ایران\" باشد."
|
607 |
+
msgstr ""
|
608 |
+
|
609 |
+
#: includes/class-iran-cities.php:67
|
610 |
+
#: includes/class-iran-cities.php:68
|
611 |
+
#@ GF_FA
|
612 |
+
msgid "Iran"
|
613 |
+
msgstr "ایران"
|
614 |
+
|
615 |
+
#: includes/class-jalali-date.php:21
|
616 |
+
#@ GF_FA
|
617 |
+
msgid "<h6>فعالسازی تاریخ شمسی</h6>در صورتی که از چند فیلد تاریخ استفاده میکنید ، فعالسازی تاریخ شمسی یکی از فیلدها کفایت میکند .<br/>تذکر : با توجه به آزمایشی بودن این قسمت ممکن است تداخل توابع سبب ناسازگاری با برخی قالب ها شود."
|
618 |
+
msgstr ""
|
619 |
+
|
620 |
+
#. translators: plugin header field 'Description'
|
621 |
+
#: index.php:0
|
622 |
+
#@ GF_FA
|
623 |
+
msgid "Gravity Forms for Iranian, This plugin extends the Gravity Forms and its addons with Persian language"
|
624 |
+
msgstr "بسته کامل فارسی ساز برای پیشرفته ترین فرمساز جهان!"
|
625 |
+
|
626 |
+
#: includes/class-melli-code.php:33
|
627 |
+
#: includes/class-melli-code.php:44
|
628 |
+
#: includes/class-melli-code.php:51
|
629 |
+
#@ GF_FA
|
630 |
+
msgid "National ID"
|
631 |
+
msgstr "کد ملی"
|
632 |
+
|
633 |
+
#: includes/class-melli-code.php:66
|
634 |
+
#@ GF_FA
|
635 |
+
msgid "با توجه به اینکه کد ملی فقط باید به صورت عدد باشد ، در صورتی که کاراکتری غیر از عدد وارد شده باشد پیغام خطا نمایش داده خواهد شد .<br/>پیغام پیشفرض : کد ملی فقط باید به صورت عدد وارد شود ."
|
636 |
+
msgstr ""
|
637 |
+
|
638 |
+
#: includes/class-melli-code.php:67
|
639 |
+
#@ GF_FA
|
640 |
+
msgid "با توجه به اینکه کد ملی می بایست 10 رقمی باشد اگر تعداد رقم وارد شده ، اشتباه باشد پیغام خطا نمایش داده خواهد شد .<br>پیغام پیشفرض : کد ملی می بایست 10 رقمی باشد . تنها در صورتی مجاز به استفاده از کد های 8 یا 9 رقمی هستید که ارقام سمت چپ 0 باشند ."
|
641 |
+
msgstr ""
|
642 |
+
|
643 |
+
#: includes/class-melli-code.php:399
|
644 |
+
#@ GF_FA
|
645 |
+
msgid "کد ملی می بایست 10 رقمی باشد . تنها در صورتی مجاز به استفاده از کد های 8 یا 9 رقمی هستید که ارقام سمت چپ 0 باشند ."
|
646 |
+
msgstr ""
|
647 |
+
|
languages/Persian_Gravityforms_By_HANNANStd-fa_IR.mo
DELETED
Binary file
|
languages/Persian_Gravityforms_By_HANNANStd-fa_IR.po
DELETED
@@ -1,555 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: Persian Gravity Forms v1.7.2\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date: 2015-07-02 02:30+0330\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: Poedit 1.6.4\n"
|
14 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
15 |
-
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
16 |
-
"_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"
|
17 |
-
"X-Textdomain-Support: yes\n"
|
18 |
-
"Language: fa_IR\n"
|
19 |
-
"X-Poedit-SearchPath-0: .\n"
|
20 |
-
|
21 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
22 |
-
#: Persian_Gravityforms_By_HANNANStd.php:305
|
23 |
-
#, php-format
|
24 |
-
msgid ""
|
25 |
-
"%sGravity Forms%s for WordPress is a full featured contact form plugin ."
|
26 |
-
msgstr "از اینکه %sGravity Forms%s فارسی را انتخاب کرده اید خوشحالیم ."
|
27 |
-
|
28 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
29 |
-
#: Persian_Gravityforms_By_HANNANStd.php:483
|
30 |
-
msgid "Cancelled"
|
31 |
-
msgstr "منصرف شده"
|
32 |
-
|
33 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
34 |
-
#: Persian_Gravityforms_By_HANNANStd.php:481
|
35 |
-
msgid "Failed"
|
36 |
-
msgstr "ناموفق"
|
37 |
-
|
38 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
39 |
-
#. translators: plugin header field 'Description'
|
40 |
-
#: Persian_Gravityforms_By_HANNANStd.php:0
|
41 |
-
msgid "Gravity Forms for Iranian"
|
42 |
-
msgstr "افزونه بومی ساز + مکمل نیرو زای Gravity Forms"
|
43 |
-
|
44 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
45 |
-
#. translators: plugin header field 'Author'
|
46 |
-
#: Persian_Gravityforms_By_HANNANStd.php:0
|
47 |
-
msgid "HANNAN Ebrahimi Setoode"
|
48 |
-
msgstr "حنان ابراهیمی ستوده"
|
49 |
-
|
50 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
51 |
-
#: Persian_Gravityforms_By_HANNANStd.php:479
|
52 |
-
msgid "Paid"
|
53 |
-
msgstr "موفق"
|
54 |
-
|
55 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
56 |
-
#: Persian_Gravityforms_By_HANNANStd.php:503
|
57 |
-
#: Persian_Gravityforms_By_HANNANStd.php:546
|
58 |
-
msgid "Payment Gateway"
|
59 |
-
msgstr "درگاه پرداخت"
|
60 |
-
|
61 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
62 |
-
#: Persian_Gravityforms_By_HANNANStd.php:541
|
63 |
-
msgid "Payment Information"
|
64 |
-
msgstr "اطلاعات پرداخت"
|
65 |
-
|
66 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
67 |
-
#: Persian_Gravityforms_By_HANNANStd.php:528
|
68 |
-
#: Persian_Gravityforms_By_HANNANStd.php:556
|
69 |
-
msgid "Payment Status"
|
70 |
-
msgstr "وضعیت پرداخت"
|
71 |
-
|
72 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
73 |
-
#. translators: plugin header field 'Name'
|
74 |
-
#: Persian_Gravityforms_By_HANNANStd.php:0
|
75 |
-
msgid "Persian Gravity Forms"
|
76 |
-
msgstr "Gravity Forms فارسی"
|
77 |
-
|
78 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
79 |
-
#: Persian_Gravityforms_By_HANNANStd.php:664
|
80 |
-
msgid "Persian Gravity Forms Dashboard"
|
81 |
-
msgstr "آخرین مطالب سایت پشتیبانی Gravity Forms فارسی"
|
82 |
-
|
83 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
84 |
-
#: Persian_Gravityforms_By_HANNANStd.php:411
|
85 |
-
msgid "Simple Payment Gateway"
|
86 |
-
msgstr "درگاه پرداخت ساده"
|
87 |
-
|
88 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
89 |
-
#: Persian_Gravityforms_By_HANNANStd.php:412
|
90 |
-
msgid "Simple Payment Status"
|
91 |
-
msgstr "وضعیت پرداخت ساده"
|
92 |
-
|
93 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
94 |
-
#: Persian_Gravityforms_By_HANNANStd.php:413
|
95 |
-
msgid "Simple Transaction ID"
|
96 |
-
msgstr "کد رهگیری ساده"
|
97 |
-
|
98 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
99 |
-
#: Persian_Gravityforms_By_HANNANStd.php:414
|
100 |
-
msgid "Styled Payment Gateway"
|
101 |
-
msgstr "درگاه پرداخت استایل بندی شده"
|
102 |
-
|
103 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
104 |
-
#: Persian_Gravityforms_By_HANNANStd.php:417
|
105 |
-
msgid "Styled Payment Pack"
|
106 |
-
msgstr "پک اطلاعات درگاه پرداخت"
|
107 |
-
|
108 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
109 |
-
#: Persian_Gravityforms_By_HANNANStd.php:415
|
110 |
-
msgid "Styled Payment Status"
|
111 |
-
msgstr "وضعیت پرداخت استایل بندی شده"
|
112 |
-
|
113 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
114 |
-
#: Persian_Gravityforms_By_HANNANStd.php:416
|
115 |
-
msgid "Styled Transaction ID"
|
116 |
-
msgstr "کد رهگیری استایل بندی شده"
|
117 |
-
|
118 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
119 |
-
#: Persian_Gravityforms_By_HANNANStd.php:515
|
120 |
-
#: Persian_Gravityforms_By_HANNANStd.php:566
|
121 |
-
msgid "Transaction ID"
|
122 |
-
msgstr "کد رهگیری"
|
123 |
-
|
124 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
125 |
-
#: Persian_Gravityforms_By_HANNANStd.php:690
|
126 |
-
msgid "<strong>RSS Error</strong>"
|
127 |
-
msgstr "در حین دریافت مطالب خطایی رخ داده است ."
|
128 |
-
|
129 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
130 |
-
#: Persian_Gravityforms_By_HANNANStd.php:695
|
131 |
-
msgid "Apparently, There are no updates to show!"
|
132 |
-
msgstr "در حال حاضر هیچ مطلبی وجود ندارد ."
|
133 |
-
|
134 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
135 |
-
#. translators: plugin header field 'PluginURI'
|
136 |
-
#: Persian_Gravityforms_By_HANNANStd.php:0
|
137 |
-
msgid "https://wordpress.org/plugins/persian-gravity-forms/"
|
138 |
-
msgstr ""
|
139 |
-
|
140 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
141 |
-
#. translators: plugin header field 'AuthorURI'
|
142 |
-
#: Persian_Gravityforms_By_HANNANStd.php:0
|
143 |
-
msgid "http://www.gravityforms.ir/"
|
144 |
-
msgstr ""
|
145 |
-
|
146 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
147 |
-
#: Persian_Gravityforms_By_HANNANStd.php:899
|
148 |
-
msgid "نمایش زیر نویس فیلد"
|
149 |
-
msgstr ""
|
150 |
-
|
151 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
152 |
-
#: Persian_Gravityforms_By_HANNANStd.php:905
|
153 |
-
msgid "جدا سازی خودکار ارقام توسط خط فاصله"
|
154 |
-
msgstr ""
|
155 |
-
|
156 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
157 |
-
#: Persian_Gravityforms_By_HANNANStd.php:917
|
158 |
-
msgid "مقدار وارد شده شامل کاراکتر غیر عددی باشد"
|
159 |
-
msgstr ""
|
160 |
-
|
161 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
162 |
-
#: Persian_Gravityforms_By_HANNANStd.php:924
|
163 |
-
msgid "تعداد ارقام وارد شده استاندارد نباشد"
|
164 |
-
msgstr ""
|
165 |
-
|
166 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
167 |
-
#: Persian_Gravityforms_By_HANNANStd.php:931
|
168 |
-
msgid "کد ملی وارد شده قبلا ثبت شده باشد"
|
169 |
-
msgstr ""
|
170 |
-
|
171 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
172 |
-
#: Persian_Gravityforms_By_HANNANStd.php:938
|
173 |
-
msgid "کد ملی وارد شده مطابق با الگوی ملی نباشد"
|
174 |
-
msgstr ""
|
175 |
-
|
176 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
177 |
-
#: Persian_Gravityforms_By_HANNANStd.php:418
|
178 |
-
msgid "RTL Start"
|
179 |
-
msgstr "ابتدای راستچین سازی"
|
180 |
-
|
181 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
182 |
-
#: Persian_Gravityforms_By_HANNANStd.php:419
|
183 |
-
msgid "RTL End"
|
184 |
-
msgstr "انتهای راستچین سازی"
|
185 |
-
|
186 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
187 |
-
#: Persian_Gravityforms_By_HANNANStd.php:222
|
188 |
-
msgid "فعالسازی تاریخ شمسی"
|
189 |
-
msgstr ""
|
190 |
-
|
191 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
192 |
-
#: Persian_Gravityforms_By_HANNANStd.php:308
|
193 |
-
msgid "خصوصی"
|
194 |
-
msgstr ""
|
195 |
-
|
196 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
197 |
-
#: Persian_Gravityforms_By_HANNANStd.php:312
|
198 |
-
msgid "ریال ایران"
|
199 |
-
msgstr ""
|
200 |
-
|
201 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
202 |
-
#: Persian_Gravityforms_By_HANNANStd.php:313
|
203 |
-
msgid "تومان"
|
204 |
-
msgstr ""
|
205 |
-
|
206 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
207 |
-
#: Persian_Gravityforms_By_HANNANStd.php:911
|
208 |
-
msgid "متن پیغام خطا هنگامی که موارد زیر رخ دهد"
|
209 |
-
msgstr ""
|
210 |
-
|
211 |
-
# @ gravityforms
|
212 |
-
#: Persian_Gravityforms_By_HANNANStd.php:1233
|
213 |
-
#, php-format
|
214 |
-
msgid "Please enter a valid date in the format (%s)."
|
215 |
-
msgstr "لطفاً یک تاریخ معتبر در ساختار (%s) وارد کنید."
|
216 |
-
|
217 |
-
# @ gravityforms
|
218 |
-
#: Persian_Gravityforms_By_HANNANStd.php:1233
|
219 |
-
msgid "Please enter a valid date."
|
220 |
-
msgstr "لطفاً یک تاریخ معتبر وارد کنید."
|
221 |
-
|
222 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
223 |
-
# @ default
|
224 |
-
#: include/Live_Preview.php:19 include/Live_Preview.php:32
|
225 |
-
msgid "پیشنمایش فرم"
|
226 |
-
msgstr ""
|
227 |
-
|
228 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
229 |
-
#: include/Live_Preview.php:20
|
230 |
-
msgid "اضافه کردن پیشنمایش فرم در فرانت اند سایت"
|
231 |
-
msgstr ""
|
232 |
-
|
233 |
-
# @ default
|
234 |
-
#: include/Live_Preview.php:61
|
235 |
-
msgid "Live Preview"
|
236 |
-
msgstr "پیش نمایش زنده"
|
237 |
-
|
238 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
239 |
-
#: include/Live_Preview.php:79
|
240 |
-
msgid "برای مشاهده پیشنمایش فرم باید در سایت وارد شوید ."
|
241 |
-
msgstr ""
|
242 |
-
|
243 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
244 |
-
#: include/Live_Preview.php:81
|
245 |
-
msgid "متاسفانه شما سطح دسترسی لازم برای مشاهده پیشنمایش فرم را ندارید ."
|
246 |
-
msgstr ""
|
247 |
-
|
248 |
-
# @ default
|
249 |
-
#: include/Multipage_Navigation.php:167
|
250 |
-
msgid "Back to Last Page"
|
251 |
-
msgstr "برگشت به صفحه قبل"
|
252 |
-
|
253 |
-
# @ gravityforms
|
254 |
-
#: include/Pre_Submission.php:131
|
255 |
-
msgid "Click to view"
|
256 |
-
msgstr "برای نمایش کلیک کنید"
|
257 |
-
|
258 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
259 |
-
#. translators: plugin header field 'Version'
|
260 |
-
#: Persian_Gravityforms_By_HANNANStd.php:0
|
261 |
-
msgid "1.7.2"
|
262 |
-
msgstr ""
|
263 |
-
|
264 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
265 |
-
#: Persian_Gravityforms_By_HANNANStd.php:318
|
266 |
-
#: Persian_Gravityforms_By_HANNANStd.php:319
|
267 |
-
msgid "IRAN"
|
268 |
-
msgstr "ایران"
|
269 |
-
|
270 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
271 |
-
#: Persian_Gravityforms_By_HANNANStd.php:320
|
272 |
-
msgid "Postal Code"
|
273 |
-
msgstr "کد پستی"
|
274 |
-
|
275 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
276 |
-
#: Persian_Gravityforms_By_HANNANStd.php:321
|
277 |
-
msgid "Province"
|
278 |
-
msgstr "استان"
|
279 |
-
|
280 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
281 |
-
#: Persian_Gravityforms_By_HANNANStd.php:323
|
282 |
-
#: Persian_Gravityforms_By_HANNANStd.php:359
|
283 |
-
msgid "Azarbaijan - East"
|
284 |
-
msgstr "آذربایجان شرقی"
|
285 |
-
|
286 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
287 |
-
#: Persian_Gravityforms_By_HANNANStd.php:324
|
288 |
-
#: Persian_Gravityforms_By_HANNANStd.php:360
|
289 |
-
msgid "Azarbaijan - West"
|
290 |
-
msgstr "آذربایجان غربی"
|
291 |
-
|
292 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
293 |
-
#: Persian_Gravityforms_By_HANNANStd.php:325
|
294 |
-
#: Persian_Gravityforms_By_HANNANStd.php:361
|
295 |
-
msgid "Ardabil"
|
296 |
-
msgstr "اردبیل"
|
297 |
-
|
298 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
299 |
-
#: Persian_Gravityforms_By_HANNANStd.php:326
|
300 |
-
#: Persian_Gravityforms_By_HANNANStd.php:362
|
301 |
-
msgid "Isfahan"
|
302 |
-
msgstr "اصفهان"
|
303 |
-
|
304 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
305 |
-
#: Persian_Gravityforms_By_HANNANStd.php:327
|
306 |
-
#: Persian_Gravityforms_By_HANNANStd.php:363
|
307 |
-
msgid "Alborz"
|
308 |
-
msgstr "البرز"
|
309 |
-
|
310 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
311 |
-
#: Persian_Gravityforms_By_HANNANStd.php:328
|
312 |
-
#: Persian_Gravityforms_By_HANNANStd.php:364
|
313 |
-
msgid "Ilam"
|
314 |
-
msgstr "ایلام"
|
315 |
-
|
316 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
317 |
-
#: Persian_Gravityforms_By_HANNANStd.php:329
|
318 |
-
#: Persian_Gravityforms_By_HANNANStd.php:365
|
319 |
-
msgid "Bushehr"
|
320 |
-
msgstr "بوشهر"
|
321 |
-
|
322 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
323 |
-
#: Persian_Gravityforms_By_HANNANStd.php:330
|
324 |
-
#: Persian_Gravityforms_By_HANNANStd.php:366
|
325 |
-
msgid "Tehran"
|
326 |
-
msgstr "تهران"
|
327 |
-
|
328 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
329 |
-
#: Persian_Gravityforms_By_HANNANStd.php:331
|
330 |
-
#: Persian_Gravityforms_By_HANNANStd.php:367
|
331 |
-
msgid "Chahar Mahaal and Bakhtiari"
|
332 |
-
msgstr "چهارمحال و بختیاری"
|
333 |
-
|
334 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
335 |
-
#: Persian_Gravityforms_By_HANNANStd.php:332
|
336 |
-
#: Persian_Gravityforms_By_HANNANStd.php:368
|
337 |
-
msgid "Khorasan - South"
|
338 |
-
msgstr "خراسان جنوبی"
|
339 |
-
|
340 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
341 |
-
#: Persian_Gravityforms_By_HANNANStd.php:333
|
342 |
-
#: Persian_Gravityforms_By_HANNANStd.php:369
|
343 |
-
msgid "Khorasan - Razavi"
|
344 |
-
msgstr "خراسان رضوی"
|
345 |
-
|
346 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
347 |
-
#: Persian_Gravityforms_By_HANNANStd.php:334
|
348 |
-
#: Persian_Gravityforms_By_HANNANStd.php:370
|
349 |
-
msgid "Khorasan - North"
|
350 |
-
msgstr "خراسان شمالی"
|
351 |
-
|
352 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
353 |
-
#: Persian_Gravityforms_By_HANNANStd.php:335
|
354 |
-
#: Persian_Gravityforms_By_HANNANStd.php:371
|
355 |
-
msgid "Khuzestan"
|
356 |
-
msgstr "خوزستان"
|
357 |
-
|
358 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
359 |
-
#: Persian_Gravityforms_By_HANNANStd.php:336
|
360 |
-
#: Persian_Gravityforms_By_HANNANStd.php:372
|
361 |
-
msgid "Zanjan"
|
362 |
-
msgstr "زنجان"
|
363 |
-
|
364 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
365 |
-
#: Persian_Gravityforms_By_HANNANStd.php:337
|
366 |
-
#: Persian_Gravityforms_By_HANNANStd.php:373
|
367 |
-
msgid "Semnan"
|
368 |
-
msgstr "سمنان"
|
369 |
-
|
370 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
371 |
-
#: Persian_Gravityforms_By_HANNANStd.php:338
|
372 |
-
#: Persian_Gravityforms_By_HANNANStd.php:374
|
373 |
-
msgid "Sistan and Baluchistan"
|
374 |
-
msgstr "سیستان و بلوچستان"
|
375 |
-
|
376 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
377 |
-
#: Persian_Gravityforms_By_HANNANStd.php:339
|
378 |
-
#: Persian_Gravityforms_By_HANNANStd.php:375
|
379 |
-
msgid "Fars"
|
380 |
-
msgstr "فارس"
|
381 |
-
|
382 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
383 |
-
#: Persian_Gravityforms_By_HANNANStd.php:340
|
384 |
-
#: Persian_Gravityforms_By_HANNANStd.php:376
|
385 |
-
msgid "Qazvin"
|
386 |
-
msgstr "قزوین"
|
387 |
-
|
388 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
389 |
-
#: Persian_Gravityforms_By_HANNANStd.php:341
|
390 |
-
#: Persian_Gravityforms_By_HANNANStd.php:377
|
391 |
-
msgid "Qom"
|
392 |
-
msgstr "قم"
|
393 |
-
|
394 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
395 |
-
#: Persian_Gravityforms_By_HANNANStd.php:342
|
396 |
-
#: Persian_Gravityforms_By_HANNANStd.php:378
|
397 |
-
msgid "Kurdistan"
|
398 |
-
msgstr "کردستان"
|
399 |
-
|
400 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
401 |
-
#: Persian_Gravityforms_By_HANNANStd.php:343
|
402 |
-
#: Persian_Gravityforms_By_HANNANStd.php:379
|
403 |
-
msgid "Kerman"
|
404 |
-
msgstr "کرمان"
|
405 |
-
|
406 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
407 |
-
#: Persian_Gravityforms_By_HANNANStd.php:344
|
408 |
-
#: Persian_Gravityforms_By_HANNANStd.php:380
|
409 |
-
msgid "Kermanshah"
|
410 |
-
msgstr "کرمانشاه"
|
411 |
-
|
412 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
413 |
-
#: Persian_Gravityforms_By_HANNANStd.php:345
|
414 |
-
#: Persian_Gravityforms_By_HANNANStd.php:381
|
415 |
-
msgid "Kohgiluyeh and Boyer-Ahmad"
|
416 |
-
msgstr "کهگیلویه و بویراحمد"
|
417 |
-
|
418 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
419 |
-
#: Persian_Gravityforms_By_HANNANStd.php:346
|
420 |
-
#: Persian_Gravityforms_By_HANNANStd.php:382
|
421 |
-
msgid "Golestan"
|
422 |
-
msgstr "گلستان"
|
423 |
-
|
424 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
425 |
-
#: Persian_Gravityforms_By_HANNANStd.php:347
|
426 |
-
#: Persian_Gravityforms_By_HANNANStd.php:383
|
427 |
-
msgid "Gilan"
|
428 |
-
msgstr "گیلان"
|
429 |
-
|
430 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
431 |
-
#: Persian_Gravityforms_By_HANNANStd.php:348
|
432 |
-
#: Persian_Gravityforms_By_HANNANStd.php:384
|
433 |
-
msgid "Lorestan"
|
434 |
-
msgstr "لرستان"
|
435 |
-
|
436 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
437 |
-
#: Persian_Gravityforms_By_HANNANStd.php:349
|
438 |
-
#: Persian_Gravityforms_By_HANNANStd.php:385
|
439 |
-
msgid "Mazandaran"
|
440 |
-
msgstr "مازندران"
|
441 |
-
|
442 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
443 |
-
#: Persian_Gravityforms_By_HANNANStd.php:350
|
444 |
-
#: Persian_Gravityforms_By_HANNANStd.php:386
|
445 |
-
msgid "Markazi"
|
446 |
-
msgstr "مرکزی"
|
447 |
-
|
448 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
449 |
-
#: Persian_Gravityforms_By_HANNANStd.php:351
|
450 |
-
#: Persian_Gravityforms_By_HANNANStd.php:387
|
451 |
-
msgid "Hormozgān"
|
452 |
-
msgstr "هرمزگان"
|
453 |
-
|
454 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
455 |
-
#: Persian_Gravityforms_By_HANNANStd.php:352
|
456 |
-
#: Persian_Gravityforms_By_HANNANStd.php:388
|
457 |
-
msgid "Hamadan"
|
458 |
-
msgstr "همدان"
|
459 |
-
|
460 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
461 |
-
#: Persian_Gravityforms_By_HANNANStd.php:353
|
462 |
-
#: Persian_Gravityforms_By_HANNANStd.php:389
|
463 |
-
msgid "Yazd"
|
464 |
-
msgstr "یزد"
|
465 |
-
|
466 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
467 |
-
#: Persian_Gravityforms_By_HANNANStd.php:359
|
468 |
-
msgid "Provinces of Iran"
|
469 |
-
msgstr "شهرهای ایران"
|
470 |
-
|
471 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
472 |
-
#: Persian_Gravityforms_By_HANNANStd.php:391
|
473 |
-
msgid "Iranian Months"
|
474 |
-
msgstr "ماه های ایرانی"
|
475 |
-
|
476 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
477 |
-
#: Persian_Gravityforms_By_HANNANStd.php:392
|
478 |
-
msgid "Farvardin"
|
479 |
-
msgstr "فروردین"
|
480 |
-
|
481 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
482 |
-
#: Persian_Gravityforms_By_HANNANStd.php:393
|
483 |
-
msgid "Ordibehesht"
|
484 |
-
msgstr "اردیبهشت"
|
485 |
-
|
486 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
487 |
-
#: Persian_Gravityforms_By_HANNANStd.php:394
|
488 |
-
msgid "Khordad"
|
489 |
-
msgstr "خرداد"
|
490 |
-
|
491 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
492 |
-
#: Persian_Gravityforms_By_HANNANStd.php:395
|
493 |
-
msgid "Tir"
|
494 |
-
msgstr "تیر"
|
495 |
-
|
496 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
497 |
-
#: Persian_Gravityforms_By_HANNANStd.php:396
|
498 |
-
msgid "Mordad"
|
499 |
-
msgstr "مرداد"
|
500 |
-
|
501 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
502 |
-
#: Persian_Gravityforms_By_HANNANStd.php:397
|
503 |
-
msgid "Shahrivar"
|
504 |
-
msgstr "شهریور"
|
505 |
-
|
506 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
507 |
-
#: Persian_Gravityforms_By_HANNANStd.php:398
|
508 |
-
msgid "Mehr"
|
509 |
-
msgstr "مهر"
|
510 |
-
|
511 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
512 |
-
#: Persian_Gravityforms_By_HANNANStd.php:399
|
513 |
-
msgid "Aban"
|
514 |
-
msgstr "آبان"
|
515 |
-
|
516 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
517 |
-
#: Persian_Gravityforms_By_HANNANStd.php:400
|
518 |
-
msgid "Azar"
|
519 |
-
msgstr "آذر"
|
520 |
-
|
521 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
522 |
-
#: Persian_Gravityforms_By_HANNANStd.php:401
|
523 |
-
msgid "Dey"
|
524 |
-
msgstr "دی"
|
525 |
-
|
526 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
527 |
-
#: Persian_Gravityforms_By_HANNANStd.php:402
|
528 |
-
msgid "Bahman"
|
529 |
-
msgstr "بهمن"
|
530 |
-
|
531 |
-
# @ Persian_Gravityforms_By_HANNANStd
|
532 |
-
#: Persian_Gravityforms_By_HANNANStd.php:403
|
533 |
-
msgid "Esfand"
|
534 |
-
msgstr "اسفند"
|
535 |
-
|
536 |
-
# @ default
|
537 |
-
#: include/News_Letter.php:14
|
538 |
-
msgid "خبرنامه"
|
539 |
-
msgstr ""
|
540 |
-
|
541 |
-
# @ gravityforms
|
542 |
-
#: include/News_Letter.php:21
|
543 |
-
msgid "There was an error while resending the notifications."
|
544 |
-
msgstr "خطایی در ارسال دوباره اعلان ها بوجود آمده است."
|
545 |
-
|
546 |
-
# @ gravityforms
|
547 |
-
#: include/News_Letter.php:27
|
548 |
-
msgid ""
|
549 |
-
"No notifications have been selected. Please select a notification to be sent."
|
550 |
-
msgstr "هیچ اعلانی انتخاب نشده است. لطفاً یک اعلان برای ارسال انتخاب کنید."
|
551 |
-
|
552 |
-
# @ gravityforms
|
553 |
-
#: include/News_Letter.php:31
|
554 |
-
msgid "The <strong>Send To</strong> email address provided is not valid."
|
555 |
-
msgstr "آدرس ایمیل که در قسمت ارسال به وارد کرده اید نامعتبر است."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/jdf.php
ADDED
@@ -0,0 +1,640 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* In The Name Of Allah */
|
3 |
+
/** Software Hijri_Shamsi , Solar(Jalali) Date and Time
|
4 |
+
Copyright(C)2011, Reza Gholampanahi , http://jdf.scr.ir
|
5 |
+
version 2.55 :: 1391/08/24 = 1433/12/18 = 2012/11/15 */
|
6 |
+
/* [ jdf.php ] version 2.55 ?> Download new version from [ http://jdf.scr.ir ] */
|
7 |
+
/*--- EDITED BY HANNANStd ---*/
|
8 |
+
|
9 |
+
|
10 |
+
/* F */
|
11 |
+
function GF_jdate($format,$timestamp='',$none='',$time_zone='Asia/Tehran',$tr_num='fa'){
|
12 |
+
|
13 |
+
$T_sec=0;/* <= رفع خطاي زمان سرور ، با اعداد '+' و '-' بر حسب ثانيه */
|
14 |
+
|
15 |
+
if($time_zone!='local')
|
16 |
+
date_default_timezone_set(($time_zone=='')?'Asia/Tehran':$time_zone);
|
17 |
+
|
18 |
+
$ts=$T_sec+(($timestamp=='' or $timestamp=='now')?time():GF_tr_num($timestamp));
|
19 |
+
$date=explode('_',date('H_i_j_n_O_P_s_w_Y',$ts));
|
20 |
+
list($j_y,$j_m,$j_d)=GF_gregorian_to_jalali($date[8],$date[3],$date[2]);
|
21 |
+
$doy=($j_m<7)?(($j_m-1)*31)+$j_d-1:(($j_m-7)*30)+$j_d+185;
|
22 |
+
$kab=($j_y%33%4-1==(int)($j_y%33*.05))?1:0;
|
23 |
+
$sl=strlen($format);
|
24 |
+
$out='';
|
25 |
+
|
26 |
+
for($i=0; $i<$sl; $i++){
|
27 |
+
$sub=substr($format,$i,1);
|
28 |
+
if($sub=='\\'){
|
29 |
+
$out.=substr($format,++$i,1);
|
30 |
+
continue;
|
31 |
+
}
|
32 |
+
|
33 |
+
switch($sub){
|
34 |
+
case'E':
|
35 |
+
case'R':
|
36 |
+
case'x':
|
37 |
+
case'X':
|
38 |
+
$out.='http://jdf.scr.ir';
|
39 |
+
break;
|
40 |
+
|
41 |
+
case'B':
|
42 |
+
case'e':
|
43 |
+
case'g':
|
44 |
+
case'G':
|
45 |
+
case'h':
|
46 |
+
case'I':
|
47 |
+
case'T':
|
48 |
+
case'u':
|
49 |
+
case'Z':
|
50 |
+
$out.=date($sub,$ts);
|
51 |
+
break;
|
52 |
+
|
53 |
+
case'a':
|
54 |
+
$out.=($date[0]<12)?'ق.ظ':'ب.ظ';
|
55 |
+
break;
|
56 |
+
|
57 |
+
case'A':
|
58 |
+
$out.=($date[0]<12)?'قبل از ظهر':'بعد از ظهر';
|
59 |
+
break;
|
60 |
+
|
61 |
+
case'b':
|
62 |
+
$out.=(int)($j_m/3.1)+1;
|
63 |
+
break;
|
64 |
+
|
65 |
+
case'c':
|
66 |
+
$out.=$j_y.'/'.$j_m.'/'.$j_d.' ،'.$date[0].':'.$date[1].':'.$date[6].' '.$date[5];
|
67 |
+
break;
|
68 |
+
|
69 |
+
case'C':
|
70 |
+
$out.=(int)(($j_y+99)/100);
|
71 |
+
break;
|
72 |
+
|
73 |
+
case'd':
|
74 |
+
$out.=($j_d<10)?'0'.$j_d:$j_d;
|
75 |
+
break;
|
76 |
+
|
77 |
+
case'D':
|
78 |
+
$out.=GF_jdate_words(array('kh'=>$date[7]),' ');
|
79 |
+
break;
|
80 |
+
|
81 |
+
case'f':
|
82 |
+
$out.=GF_jdate_words(array('ff'=>$j_m),' ');
|
83 |
+
break;
|
84 |
+
|
85 |
+
case'F':
|
86 |
+
$out.=GF_jdate_words(array('mm'=>$j_m),' ');
|
87 |
+
break;
|
88 |
+
|
89 |
+
case'H':
|
90 |
+
$out.=$date[0];
|
91 |
+
break;
|
92 |
+
|
93 |
+
case'i':
|
94 |
+
$out.=$date[1];
|
95 |
+
break;
|
96 |
+
|
97 |
+
case'j':
|
98 |
+
$out.=$j_d;
|
99 |
+
break;
|
100 |
+
|
101 |
+
case'J':
|
102 |
+
$out.=GF_jdate_words(array('rr'=>$j_d),' ');
|
103 |
+
break;
|
104 |
+
|
105 |
+
case'k';
|
106 |
+
$out.=GF_tr_num(100-(int)($doy/($kab+365)*1000)/10,$tr_num);
|
107 |
+
break;
|
108 |
+
|
109 |
+
case'K':
|
110 |
+
$out.=GF_tr_num((int)($doy/($kab+365)*1000)/10,$tr_num);
|
111 |
+
break;
|
112 |
+
|
113 |
+
case'l':
|
114 |
+
$out.=GF_jdate_words(array('rh'=>$date[7]),' ');
|
115 |
+
break;
|
116 |
+
|
117 |
+
case'L':
|
118 |
+
$out.=$kab;
|
119 |
+
break;
|
120 |
+
|
121 |
+
case'm':
|
122 |
+
$out.=($j_m>9)?$j_m:'0'.$j_m;
|
123 |
+
break;
|
124 |
+
|
125 |
+
case'M':
|
126 |
+
$out.=GF_jdate_words(array('km'=>$j_m),' ');
|
127 |
+
break;
|
128 |
+
|
129 |
+
case'n':
|
130 |
+
$out.=$j_m;
|
131 |
+
break;
|
132 |
+
|
133 |
+
case'N':
|
134 |
+
$out.=$date[7]+1;
|
135 |
+
break;
|
136 |
+
|
137 |
+
case'o':
|
138 |
+
$jdw=($date[7]==6)?0:$date[7]+1;
|
139 |
+
$dny=364+$kab-$doy;
|
140 |
+
$out.=($jdw>($doy+3) and $doy<3)?$j_y-1:(((3-$dny)>$jdw and $dny<3)?$j_y+1:$j_y);
|
141 |
+
break;
|
142 |
+
|
143 |
+
case'O':
|
144 |
+
$out.=$date[4];
|
145 |
+
break;
|
146 |
+
|
147 |
+
case'p':
|
148 |
+
$out.=GF_jdate_words(array('mb'=>$j_m),' ');
|
149 |
+
break;
|
150 |
+
|
151 |
+
case'P':
|
152 |
+
$out.=$date[5];
|
153 |
+
break;
|
154 |
+
|
155 |
+
case'q':
|
156 |
+
$out.=GF_jdate_words(array('sh'=>$j_y),' ');
|
157 |
+
break;
|
158 |
+
|
159 |
+
case'Q':
|
160 |
+
$out.=$kab+364-$doy;
|
161 |
+
break;
|
162 |
+
|
163 |
+
case'r':
|
164 |
+
$key=GF_jdate_words(array('rh'=>$date[7],'mm'=>$j_m));
|
165 |
+
$out.=$date[0].':'.$date[1].':'.$date[6].' '.$date[4] .' '.$key['rh'].'، '.$j_d.' '.$key['mm'].' '.$j_y;
|
166 |
+
break;
|
167 |
+
|
168 |
+
case's':
|
169 |
+
$out.=$date[6];
|
170 |
+
break;
|
171 |
+
|
172 |
+
case'S':
|
173 |
+
$out.='ام';
|
174 |
+
break;
|
175 |
+
|
176 |
+
case't':
|
177 |
+
$out.=($j_m!=12)?(31-(int)($j_m/6.5)):($kab+29);
|
178 |
+
break;
|
179 |
+
|
180 |
+
case'U':
|
181 |
+
$out.=$ts;
|
182 |
+
break;
|
183 |
+
|
184 |
+
case'v':
|
185 |
+
$out.=GF_jdate_words(array('ss'=>substr($j_y,2,2)),' ');
|
186 |
+
break;
|
187 |
+
|
188 |
+
case'V':
|
189 |
+
$out.=GF_jdate_words(array('ss'=>$j_y),' ');
|
190 |
+
break;
|
191 |
+
|
192 |
+
case'w':
|
193 |
+
$out.=($date[7]==6)?0:$date[7]+1;
|
194 |
+
break;
|
195 |
+
|
196 |
+
case'W':
|
197 |
+
$avs=(($date[7]==6)?0:$date[7]+1)-($doy%7);
|
198 |
+
if($avs<0)
|
199 |
+
$avs+=7;
|
200 |
+
$num=(int)(($doy+$avs)/7);
|
201 |
+
if($avs<4){
|
202 |
+
$num++;
|
203 |
+
}
|
204 |
+
elseif($num<1){
|
205 |
+
$num=($avs==4 or $avs==(($j_y%33%4-2==(int)($j_y%33*.05))?5:4))? 53 : 52;
|
206 |
+
}
|
207 |
+
$aks=$avs+$kab;
|
208 |
+
if($aks==7)
|
209 |
+
$aks=0;
|
210 |
+
$out.=(($kab+363-$doy)<$aks and $aks<3)?'01':(($num<10)?'0'.$num:$num);
|
211 |
+
break;
|
212 |
+
|
213 |
+
case'y':
|
214 |
+
$out.=substr($j_y,2,2);
|
215 |
+
break;
|
216 |
+
|
217 |
+
case'Y':
|
218 |
+
$out.=$j_y;
|
219 |
+
break;
|
220 |
+
|
221 |
+
case'z':
|
222 |
+
$out.=$doy;
|
223 |
+
break;
|
224 |
+
|
225 |
+
default:
|
226 |
+
$out.=$sub;
|
227 |
+
}
|
228 |
+
}
|
229 |
+
return($tr_num!='en')?GF_tr_num($out,'fa','.'):$out;
|
230 |
+
}
|
231 |
+
|
232 |
+
/* F */
|
233 |
+
function GF_jstrftime($format,$timestamp='',$none='',$time_zone='Asia/Tehran',$tr_num='fa'){
|
234 |
+
|
235 |
+
$T_sec=0;/* <= رفع خطاي زمان سرور ، با اعداد '+' و '-' بر حسب ثانيه */
|
236 |
+
if($time_zone!='local')
|
237 |
+
date_default_timezone_set(($time_zone=='')?'Asia/Tehran':$time_zone);
|
238 |
+
|
239 |
+
$ts=$T_sec+(($timestamp=='' or $timestamp=='now')?time():GF_tr_num($timestamp));
|
240 |
+
$date=explode('_',date('h_H_i_j_n_s_w_Y',$ts));
|
241 |
+
list($j_y,$j_m,$j_d)=GF_gregorian_to_jalali($date[7],$date[4],$date[3]);
|
242 |
+
$doy=($j_m<7)?(($j_m-1)*31)+$j_d-1:(($j_m-7)*30)+$j_d+185;
|
243 |
+
|
244 |
+
$kab=($j_y%33%4-1==(int)($j_y%33*.05))?1:0;
|
245 |
+
$sl=strlen($format);
|
246 |
+
$out='';
|
247 |
+
for($i=0; $i<$sl; $i++){
|
248 |
+
|
249 |
+
$sub=substr($format,$i,1);
|
250 |
+
|
251 |
+
if($sub=='%'){
|
252 |
+
$sub=substr($format,++$i,1);
|
253 |
+
}
|
254 |
+
else{
|
255 |
+
$out.=$sub;
|
256 |
+
continue;
|
257 |
+
}
|
258 |
+
|
259 |
+
switch($sub){
|
260 |
+
|
261 |
+
/* Day */
|
262 |
+
case'a':
|
263 |
+
$out.=GF_jdate_words(array('kh'=>$date[6]),' ');
|
264 |
+
break;
|
265 |
+
|
266 |
+
case'A':
|
267 |
+
$out.=GF_jdate_words(array('rh'=>$date[6]),' ');
|
268 |
+
break;
|
269 |
+
|
270 |
+
case'd':
|
271 |
+
$out.=($j_d<10)?'0'.$j_d:$j_d;
|
272 |
+
break;
|
273 |
+
|
274 |
+
case'e':
|
275 |
+
$out.=($j_d<10)?' '.$j_d:$j_d;
|
276 |
+
break;
|
277 |
+
|
278 |
+
case'j':
|
279 |
+
$out.=str_pad($doy+1,3,0,STR_PAD_LEFT);
|
280 |
+
break;
|
281 |
+
|
282 |
+
case'u':
|
283 |
+
$out.=$date[6]+1;
|
284 |
+
break;
|
285 |
+
|
286 |
+
case'w':
|
287 |
+
$out.=($date[6]==6)?0:$date[6]+1;
|
288 |
+
break;
|
289 |
+
|
290 |
+
/* Week */
|
291 |
+
case'U':
|
292 |
+
$avs=(($date[6]<5)?$date[6]+2:$date[6]-5)-($doy%7);
|
293 |
+
if($avs<0)
|
294 |
+
$avs+=7;
|
295 |
+
$num=(int)(($doy+$avs)/7)+1;
|
296 |
+
if($avs>3 or $avs==1)
|
297 |
+
$num--;
|
298 |
+
$out.=($num<10)?'0'.$num:$num;
|
299 |
+
break;
|
300 |
+
|
301 |
+
case'V':
|
302 |
+
$avs=(($date[6]==6)?0:$date[6]+1)-($doy%7);
|
303 |
+
|
304 |
+
if($avs<0)
|
305 |
+
$avs+=7;
|
306 |
+
$num=(int)(($doy+$avs)/7);
|
307 |
+
|
308 |
+
if($avs<4){
|
309 |
+
$num++;
|
310 |
+
}elseif($num<1){
|
311 |
+
$num=($avs==4 or $avs==(($j_y%33%4-2==(int)($j_y%33*.05))?5:4))?53:52;
|
312 |
+
}
|
313 |
+
|
314 |
+
$aks=$avs+$kab;
|
315 |
+
if($aks==7)
|
316 |
+
$aks=0;
|
317 |
+
$out.=(($kab+363-$doy)<$aks and $aks<3)?'01':(($num<10)?'0'.$num:$num);
|
318 |
+
break;
|
319 |
+
|
320 |
+
case'W':
|
321 |
+
$avs=(($date[6]==6)?0:$date[6]+1)-($doy%7);
|
322 |
+
if($avs<0)
|
323 |
+
$avs+=7;
|
324 |
+
$num=(int)(($doy+$avs)/7)+1;
|
325 |
+
if($avs>3)
|
326 |
+
$num--;
|
327 |
+
$out.=($num<10)?'0'.$num:$num;
|
328 |
+
break;
|
329 |
+
|
330 |
+
/* Month */
|
331 |
+
case'b':
|
332 |
+
case'h':
|
333 |
+
$out.=GF_jdate_words(array('km'=>$j_m),' ');
|
334 |
+
break;
|
335 |
+
|
336 |
+
case'B':
|
337 |
+
$out.=GF_jdate_words(array('mm'=>$j_m),' ');
|
338 |
+
break;
|
339 |
+
|
340 |
+
case'm':
|
341 |
+
$out.=($j_m>9)?$j_m:'0'.$j_m;
|
342 |
+
break;
|
343 |
+
|
344 |
+
/* Year */
|
345 |
+
case'C':
|
346 |
+
$out.=substr($j_y,0,2);
|
347 |
+
break;
|
348 |
+
|
349 |
+
case'g':
|
350 |
+
$jdw=($date[6]==6)?0:$date[6]+1;
|
351 |
+
$dny=364+$kab-$doy;
|
352 |
+
$out.=substr(($jdw>($doy+3) and $doy<3)?$j_y-1:(((3-$dny)>$jdw and $dny<3)?$j_y+1:$j_y),2,2);
|
353 |
+
break;
|
354 |
+
|
355 |
+
case'G':
|
356 |
+
$jdw=($date[6]==6)?0:$date[6]+1;
|
357 |
+
$dny=364+$kab-$doy;
|
358 |
+
$out.=($jdw>($doy+3) and $doy<3)?$j_y-1:(((3-$dny)>$jdw and $dny<3)?$j_y+1:$j_y);
|
359 |
+
break;
|
360 |
+
|
361 |
+
case'y':
|
362 |
+
$out.=substr($j_y,2,2);
|
363 |
+
break;
|
364 |
+
|
365 |
+
case'Y':
|
366 |
+
$out.=$j_y;
|
367 |
+
break;
|
368 |
+
|
369 |
+
/* Time */
|
370 |
+
case'H':
|
371 |
+
$out.=$date[1];
|
372 |
+
break;
|
373 |
+
|
374 |
+
case'I':
|
375 |
+
$out.=$date[0];
|
376 |
+
break;
|
377 |
+
|
378 |
+
case'l':
|
379 |
+
$out.=($date[0]>9)?$date[0]:' '.(int)$date[0];
|
380 |
+
break;
|
381 |
+
|
382 |
+
case'M':
|
383 |
+
$out.=$date[2];
|
384 |
+
break;
|
385 |
+
|
386 |
+
case'p':
|
387 |
+
$out.=($date[1]<12)?'قبل از ظهر':'بعد از ظهر';
|
388 |
+
break;
|
389 |
+
|
390 |
+
case'P':
|
391 |
+
$out.=($date[1]<12)?'ق.ظ':'ب.ظ';
|
392 |
+
break;
|
393 |
+
|
394 |
+
case'r':
|
395 |
+
$out.=$date[0].':'.$date[2].':'.$date[5].' '.(($date[1]<12)?'قبل از ظهر':'بعد از ظهر');
|
396 |
+
break;
|
397 |
+
|
398 |
+
case'R':
|
399 |
+
$out.=$date[1].':'.$date[2];
|
400 |
+
break;
|
401 |
+
|
402 |
+
case'S':
|
403 |
+
$out.=$date[5];
|
404 |
+
break;
|
405 |
+
|
406 |
+
case'T':
|
407 |
+
$out.=$date[1].':'.$date[2].':'.$date[5];
|
408 |
+
break;
|
409 |
+
|
410 |
+
case'X':
|
411 |
+
$out.=$date[0].':'.$date[2].':'.$date[5];
|
412 |
+
break;
|
413 |
+
|
414 |
+
case'z':
|
415 |
+
$out.=date('O',$ts);
|
416 |
+
break;
|
417 |
+
|
418 |
+
case'Z':
|
419 |
+
$out.=date('T',$ts);
|
420 |
+
break;
|
421 |
+
|
422 |
+
/* Time and Date Stamps */
|
423 |
+
case'c':
|
424 |
+
$key=GF_jdate_words(array('rh'=>$date[6],'mm'=>$j_m));
|
425 |
+
$out.=$date[1].':'.$date[2].':'.$date[5].' '.date('P',$ts) .' '.$key['rh'].'، '.$j_d.' '.$key['mm'].' '.$j_y;
|
426 |
+
break;
|
427 |
+
|
428 |
+
case'D':
|
429 |
+
$out.=substr($j_y,2,2).'/'.(($j_m>9)?$j_m:'0'.$j_m).'/'.(($j_d<10)?'0'.$j_d:$j_d);
|
430 |
+
break;
|
431 |
+
|
432 |
+
case'F':
|
433 |
+
$out.=$j_y.'-'.(($j_m>9)?$j_m:'0'.$j_m).'-'.(($j_d<10)?'0'.$j_d:$j_d);
|
434 |
+
break;
|
435 |
+
|
436 |
+
case's':
|
437 |
+
$out.=$ts;
|
438 |
+
break;
|
439 |
+
|
440 |
+
case'x':
|
441 |
+
$out.=substr($j_y,2,2).'/'.(($j_m>9)?$j_m:'0'.$j_m).'/'.(($j_d<10)?'0'.$j_d:$j_d);
|
442 |
+
break;
|
443 |
+
|
444 |
+
/* Miscellaneous */
|
445 |
+
case'n':
|
446 |
+
$out.="\n";
|
447 |
+
break;
|
448 |
+
|
449 |
+
case't':
|
450 |
+
$out.="\t";
|
451 |
+
break;
|
452 |
+
|
453 |
+
case'%':
|
454 |
+
$out.='%';
|
455 |
+
break;
|
456 |
+
|
457 |
+
default:$out.=$sub;
|
458 |
+
}
|
459 |
+
}
|
460 |
+
|
461 |
+
return($tr_num!='en')?GF_tr_num($out,'fa','.'):$out;
|
462 |
+
}
|
463 |
+
|
464 |
+
/* F */
|
465 |
+
function GF_jmktime($h='',$m='',$s='',$jm='',$jd='',$jy='',$is_dst=-1){
|
466 |
+
$h=GF_tr_num($h); $m=GF_tr_num($m); $s=GF_tr_num($s); $jm=GF_tr_num($jm); $jd=GF_tr_num($jd); $jy=GF_tr_num($jy);
|
467 |
+
if($h=='' and $m=='' and $s=='' and $jm=='' and $jd=='' and $jy==''){
|
468 |
+
return mktime();
|
469 |
+
}
|
470 |
+
else{
|
471 |
+
list($year,$month,$day)=GF_jalali_to_gregorian($jy,$jm,$jd);
|
472 |
+
return mktime($h,$m,$s,$month,$day,$year,$is_dst);
|
473 |
+
}
|
474 |
+
}
|
475 |
+
|
476 |
+
|
477 |
+
/* F */
|
478 |
+
function GF_jgetdate($timestamp='',$none='',$tz='Asia/Tehran',$tn='en'){
|
479 |
+
$ts=($timestamp=='')?time():GF_tr_num($timestamp);
|
480 |
+
$jdate=explode('_',GF_jdate('F_G_i_j_l_n_s_w_Y_z',$ts,'',$tz,$tn));
|
481 |
+
return array(
|
482 |
+
'seconds'=>GF_tr_num((int)GF_tr_num($jdate[6]),$tn),
|
483 |
+
'minutes'=>GF_tr_num((int)GF_tr_num($jdate[2]),$tn),
|
484 |
+
'hours'=>$jdate[1],
|
485 |
+
'mday'=>$jdate[3],
|
486 |
+
'wday'=>$jdate[7],
|
487 |
+
'mon'=>$jdate[5],
|
488 |
+
'year'=>$jdate[8],
|
489 |
+
'yday'=>$jdate[9],
|
490 |
+
'weekday'=>$jdate[4],
|
491 |
+
'month'=>$jdate[0],
|
492 |
+
0=>GF_tr_num($ts,$tn)
|
493 |
+
);
|
494 |
+
}
|
495 |
+
|
496 |
+
/* F */
|
497 |
+
function GF_jcheckdate($jm,$jd,$jy){
|
498 |
+
$jm=GF_tr_num($jm);
|
499 |
+
$jd=GF_tr_num($jd);
|
500 |
+
$jy=GF_tr_num($jy);
|
501 |
+
$l_d=($jm==12)?(($jy%33%4-1==(int)($jy%33*.05))?30:29):31-(int)($jm/6.5);
|
502 |
+
return($jm>0 and $jd>0 and $jy>0 and $jm<13 and $jd<=$l_d)?true:false;
|
503 |
+
}
|
504 |
+
|
505 |
+
/* F */
|
506 |
+
function GF_tr_num($str,$mod='en',$mf='٫'){
|
507 |
+
$num_a=array('0','1','2','3','4','5','6','7','8','9','.');
|
508 |
+
$key_a=array('۰','۱','۲','۳','۴','۵','۶','۷','۸','۹',$mf);
|
509 |
+
return($mod=='fa')?str_replace($num_a,$key_a,$str):str_replace($key_a,$num_a,$str);
|
510 |
+
}
|
511 |
+
|
512 |
+
/* F */
|
513 |
+
function GF_jdate_words($array,$mod=''){
|
514 |
+
foreach($array as $type=>$num){
|
515 |
+
$num=(int)GF_tr_num($num);
|
516 |
+
switch($type){
|
517 |
+
case'ss':
|
518 |
+
$sl=strlen($num);
|
519 |
+
$xy3=substr($num,2-$sl,1);
|
520 |
+
$h3=$h34=$h4='';
|
521 |
+
if($xy3==1){
|
522 |
+
$p34='';
|
523 |
+
$k34=array('ده','یازده','دوازده','سیزده','چهارده','پانزده','شانزده','هفده','هجده','نوزده');
|
524 |
+
$h34=$k34[substr($num,2-$sl,2)-10];
|
525 |
+
} else {
|
526 |
+
$xy4=substr($num,3-$sl,1);
|
527 |
+
$p34=($xy3==0 or $xy4==0)?'':' و ';
|
528 |
+
$k3=array('','','بیست','سی','چهل','پنجاه','شصت','هفتاد','هشتاد','نود');
|
529 |
+
$h3=$k3[$xy3];
|
530 |
+
$k4=array('','یک','دو','سه','چهار','پنج','شش','هفت','هشت','نه');
|
531 |
+
$h4=$k4[$xy4];
|
532 |
+
}
|
533 |
+
$array[$type]=(($num>99)?str_ireplace(array('12','13','14','19','20'),
|
534 |
+
array('هزار و دویست','هزار و سیصد','هزار و چهارصد','هزار و نهصد','دوهزار'),
|
535 |
+
substr($num,0,2)).((substr($num,2,2)=='00')?'':' و '):'').$h3.$p34.$h34.$h4;
|
536 |
+
break;
|
537 |
+
|
538 |
+
case'mm':
|
539 |
+
$key=array('فروردین','اردیبهشت','خرداد','تیر','مرداد','شهریور','مهر','آبان','آذر','دی','بهمن','اسفند');
|
540 |
+
$array[$type]=$key[$num-1];
|
541 |
+
break;
|
542 |
+
|
543 |
+
case'rr':
|
544 |
+
$key=array('یک','دو','سه','چهار','پنج','شش','هفت','هشت','نه','ده','یازده','دوازده','سیزده',
|
545 |
+
'چهارده','پانزده','شانزده','هفده','هجده','نوزده','بیست','بیست و یک','بیست و دو','بیست و سه',
|
546 |
+
'بیست و چهار','بیست و پنج','بیست و شش','بیست و هفت','بیست و هشت','بیست و نه','سی','سی و یک');
|
547 |
+
$array[$type]=$key[$num-1];
|
548 |
+
break;
|
549 |
+
|
550 |
+
case'rh':
|
551 |
+
$key=array('یکشنبه','دوشنبه','سه شنبه','چهارشنبه','پنجشنبه','جمعه','شنبه');
|
552 |
+
$array[$type]=$key[$num];
|
553 |
+
break;
|
554 |
+
|
555 |
+
case'sh':
|
556 |
+
$key=array('مار','اسب','گوسفند','میمون','مرغ','سگ','خوک','موش','گاو','پلنگ','خرگوش','نهنگ');
|
557 |
+
$array[$type]=$key[$num%12];
|
558 |
+
break;
|
559 |
+
|
560 |
+
case'mb':
|
561 |
+
$key=array('حمل','ثور','جوزا','سرطان','اسد','سنبله','میزان','عقرب','قوس','جدی','دلو','حوت');
|
562 |
+
$array[$type]=$key[$num-1];
|
563 |
+
break;
|
564 |
+
|
565 |
+
case'ff':
|
566 |
+
$key=array('بهار','تابستان','پاییز','زمستان');
|
567 |
+
$array[$type]=$key[(int)($num/3.1)];
|
568 |
+
break;
|
569 |
+
|
570 |
+
case'km':
|
571 |
+
$key=array('فر','ار','خر','تی','مر','شه','مه','آب','آذ','دی','به','اس');
|
572 |
+
$array[$type]=$key[$num-1];
|
573 |
+
break;
|
574 |
+
|
575 |
+
case'kh':
|
576 |
+
$key=array('ی','د','س','چ','پ','ج','ش');
|
577 |
+
$array[$type]=$key[$num];
|
578 |
+
break;
|
579 |
+
|
580 |
+
default:$array[$type]=$num;
|
581 |
+
}
|
582 |
+
}
|
583 |
+
return($mod=='')?$array:implode($mod,$array);
|
584 |
+
}
|
585 |
+
/** Convertor from and to Gregorian and Jalali (Hijri_Shamsi,Solar) Functions
|
586 |
+
Copyright(C)2011, Reza Gholampanahi [ http://jdf.scr.ir/jdf ] version 2.50 */
|
587 |
+
|
588 |
+
/* F */
|
589 |
+
function GF_gregorian_to_jalali($g_y,$g_m,$g_d,$mod=''){
|
590 |
+
$g_y=GF_tr_num($g_y);
|
591 |
+
$g_m=GF_tr_num($g_m);
|
592 |
+
$g_d=GF_tr_num($g_d);/* <= :اين سطر ، جزء تابع اصلي نيست */
|
593 |
+
$d_4=$g_y%4;
|
594 |
+
$g_a=array(0,0,31,59,90,120,151,181,212,243,273,304,334);
|
595 |
+
$doy_g=$g_a[(int)$g_m]+$g_d;
|
596 |
+
if($d_4==0 and $g_m>2)
|
597 |
+
$doy_g++;
|
598 |
+
$d_33=(int)((($g_y-16)%132)*.0305);
|
599 |
+
$a=($d_33==3 or $d_33<($d_4-1) or $d_4==0)?286:287;
|
600 |
+
$b=(($d_33==1 or $d_33==2) and ($d_33==$d_4 or $d_4==1))?78:(($d_33==3 and $d_4==0)?80:79);
|
601 |
+
if((int)(($g_y-10)/63)==30){
|
602 |
+
$a--;$b++;
|
603 |
+
}
|
604 |
+
if($doy_g>$b){
|
605 |
+
$jy=$g_y-621; $doy_j=$doy_g-$b;
|
606 |
+
}else{
|
607 |
+
$jy=$g_y-622; $doy_j=$doy_g+$a;
|
608 |
+
}
|
609 |
+
if($doy_j<187){
|
610 |
+
$jm=(int)(($doy_j-1)/31); $jd=$doy_j-(31*$jm++);
|
611 |
+
}else{
|
612 |
+
$jm=(int)(($doy_j-187)/30); $jd=$doy_j-186-($jm*30); $jm+=7;
|
613 |
+
}
|
614 |
+
return($mod=='')?array($jy,$jm,$jd):$jy.$mod.$jm.$mod.$jd;
|
615 |
+
}
|
616 |
+
|
617 |
+
/* F */
|
618 |
+
function GF_jalali_to_gregorian($j_y,$j_m,$j_d,$mod=''){
|
619 |
+
$j_y=GF_tr_num($j_y);
|
620 |
+
$j_m=GF_tr_num($j_m);
|
621 |
+
$j_d=GF_tr_num($j_d);/* <= :اين سطر ، جزء تابع اصلي نيست */
|
622 |
+
$d_4=($j_y+1)%4;
|
623 |
+
$doy_j=($j_m<7)?(($j_m-1)*31)+$j_d:(($j_m-7)*30)+$j_d+186;
|
624 |
+
$d_33=(int)((($j_y-55)%132)*.0305);
|
625 |
+
$a=($d_33!=3 and $d_4<=$d_33)?287:286;
|
626 |
+
$b=(($d_33==1 or $d_33==2) and ($d_33==$d_4 or $d_4==1))?78:(($d_33==3 and $d_4==0)?80:79);
|
627 |
+
if((int)(($j_y-19)/63)==20){
|
628 |
+
$a--;$b++;
|
629 |
+
}
|
630 |
+
if($doy_j<=$a){
|
631 |
+
$gy=$j_y+621; $gd=$doy_j+$b;
|
632 |
+
}else{
|
633 |
+
$gy=$j_y+622; $gd=$doy_j-$a;
|
634 |
+
}
|
635 |
+
foreach(array(0,31,($gy%4==0)?29:28,31,30,31,30,31,31,30,31,30,31) as $gm=>$v){
|
636 |
+
if($gd<=$v)break;
|
637 |
+
$gd-=$v;
|
638 |
+
}
|
639 |
+
return($mod=='')?array($gy,$gm,$gd):$gy.$mod.$gm.$mod.$gd;
|
640 |
+
}
|
persian-gravity.php
ADDED
@@ -0,0 +1,810 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
3 |
+
|
4 |
+
class GFParsi {
|
5 |
+
|
6 |
+
public $author = 'HANNANStd';
|
7 |
+
|
8 |
+
public $version = GF_PARSI_VERSION;
|
9 |
+
|
10 |
+
protected $file = __FILE__;
|
11 |
+
|
12 |
+
protected $language;
|
13 |
+
|
14 |
+
protected $is_persian;
|
15 |
+
|
16 |
+
private $feed = 'http://gravityforms.ir/feed/';
|
17 |
+
|
18 |
+
private $files = array(
|
19 |
+
'live-preview',
|
20 |
+
'news-letter',
|
21 |
+
'post-content-merge-tags',
|
22 |
+
'pre-submission',
|
23 |
+
'snippets',
|
24 |
+
'subtotal-calc',
|
25 |
+
'wpp-gravity-forms',
|
26 |
+
'iran-cities',
|
27 |
+
'multipage-navigation',
|
28 |
+
'melli-code',
|
29 |
+
'jalali-date',
|
30 |
+
'wp-session'
|
31 |
+
);
|
32 |
+
|
33 |
+
public function __construct() {
|
34 |
+
|
35 |
+
if ( ! class_exists('GFCommon') ) {
|
36 |
+
add_action('admin_notices', array( $this , 'admin_notice'));
|
37 |
+
return;
|
38 |
+
}
|
39 |
+
|
40 |
+
$this->language();
|
41 |
+
|
42 |
+
$this->include_files();
|
43 |
+
|
44 |
+
|
45 |
+
//# ;)
|
46 |
+
add_action('admin_footer', array( $this, 'remove_lic'));
|
47 |
+
add_filter('update_footer', array( $this, 'admin_footer'), 11);
|
48 |
+
|
49 |
+
//#اضافه کردن وضعیت خصوصی به وضعیت پست ها
|
50 |
+
add_action('gform_post_status_options', array( $this, 'add_private_post_status'));
|
51 |
+
|
52 |
+
//# راستچین سازی اینلاین فرم
|
53 |
+
add_action('wp_footer', array($this ,'wp_footer'));
|
54 |
+
|
55 |
+
//# خبر خوان در داشبورد ادمین
|
56 |
+
add_action('wp_dashboard_setup', array( $this, 'rss_dashboard'));
|
57 |
+
|
58 |
+
//#نمایش وضعیت پرداخت ها
|
59 |
+
add_action('gform_entries_first_column', array($this ,'show_payment_status'), 10, 5);
|
60 |
+
|
61 |
+
//# فراخوانی فایل های ترجمه
|
62 |
+
add_filter('load_textdomain_mofile', array( $this, 'load_translate'), 10, 2 );
|
63 |
+
|
64 |
+
//# تبدیل فیلد های با ورودی غیر تکراری فقط برای پرداخت های موفق
|
65 |
+
add_filter('gform_is_duplicate', array( $this, 'better_noDuplicate' ), 10, 4 );
|
66 |
+
|
67 |
+
//# کد رهگیری برای همه فرم ها
|
68 |
+
add_action('gform_entry_created', array($this ,'transaction_id'), 10, 2);
|
69 |
+
add_filter($this->author.'_gf_rand_transaction_id', array($this ,'transaction_id_mask'), 10, 3);
|
70 |
+
|
71 |
+
//# واحد پولی ایران
|
72 |
+
add_filter('gform_currencies', array( $this, 'iran_currencies' ) );
|
73 |
+
|
74 |
+
//# اضافه کردن گزینه های ایران به گزینه های آماده
|
75 |
+
add_filter('gform_predefined_choices', array( $this, 'predefined_choices' ),1);
|
76 |
+
|
77 |
+
//#جداسازی استایل های فارسی ساز از حالت بدون تداخل
|
78 |
+
add_filter('gform_noconflict_styles', array( $this, 'noconflict_styles'));
|
79 |
+
add_filter('gform_noconflict_scripts', array( $this, 'noconflict_scripts'));
|
80 |
+
|
81 |
+
//راستچین سازی استایل پرینت
|
82 |
+
add_filter('gform_print_styles', array( $this, 'print_rtl'), 10, 2);
|
83 |
+
|
84 |
+
//#استایل و اسکریپت های ادمین
|
85 |
+
add_action('admin_enqueue_scripts', array( $this, 'admin_rtl' ));
|
86 |
+
|
87 |
+
//# اضافه کردن برچسب های ادغام به تاییدیه و اعلان
|
88 |
+
add_action('gform_admin_pre_render', array( $this, 'merge_tags_admin'));
|
89 |
+
add_filter('gform_replace_merge_tags', array( $this, 'replace_merge_tags'), 999, 7);
|
90 |
+
// add_filter('gform_pre_replace_merge_tags', array( $this, 'pre_replace_merge_tags'), 999, 7);
|
91 |
+
|
92 |
+
}
|
93 |
+
|
94 |
+
public function admin_notice() {
|
95 |
+
$class = 'notice notice-error';
|
96 |
+
$message = sprintf( __('Persian Gravity Forms requires Gravityforms Core. Please install or activate it to continue. %sSee FAQ%s', 'GF_FA' ) , '<a href="http://gravityforms.ir/faq/" target="_blank">', '</a>' );
|
97 |
+
printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $message );
|
98 |
+
}
|
99 |
+
|
100 |
+
public function language() {
|
101 |
+
|
102 |
+
if ( $this->language == null ) {
|
103 |
+
$this->language = get_locale();
|
104 |
+
}
|
105 |
+
|
106 |
+
$wplang = defined('WPLANG') ? get_option( 'WPLANG', WPLANG ) : '';
|
107 |
+
$this->is_persian = ( substr($this->language, 0 , 2) == 'fa' ) || ( !empty($wplang) && substr($wplang, 0 , 2) == 'fa' );
|
108 |
+
|
109 |
+
if ( defined( 'ICL_LANGUAGE_CODE' ) ) {
|
110 |
+
$this->is_persian = substr(ICL_LANGUAGE_CODE, 0 , 2) == 'fa';
|
111 |
+
}
|
112 |
+
}
|
113 |
+
|
114 |
+
|
115 |
+
public function include_files() {
|
116 |
+
|
117 |
+
$files = $this->files;
|
118 |
+
|
119 |
+
foreach ( (array) $files as $file ) {
|
120 |
+
include GF_PARSI_DIR . '/includes/class-' . $file . '.php';
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
public function is_gravity_page() {
|
125 |
+
|
126 |
+
if ( !class_exists('RGForms') )
|
127 |
+
return false;
|
128 |
+
|
129 |
+
$current_page = trim(strtolower(RGForms::get("page")));
|
130 |
+
return ( substr( $current_page , 0 , 2) == 'gf' || stripos( $current_page, 'gravity' ) !== false );
|
131 |
+
}
|
132 |
+
|
133 |
+
|
134 |
+
public function admin_footer($text) {
|
135 |
+
$text = sprintf(__("Thanks for choosing %sPersian Gravity Forms%s", "GF_FA"), '<a href="http://gravityforms.ir" target="_blank">', "</a>");
|
136 |
+
return $text;
|
137 |
+
}
|
138 |
+
|
139 |
+
public function remove_lic(){
|
140 |
+
|
141 |
+
if ( get_option( 'gform_pending_installation' ) ) {
|
142 |
+
|
143 |
+
update_option( 'gform_pending_installation', false );
|
144 |
+
$current_version = get_option( 'rg_form_version' );
|
145 |
+
|
146 |
+
if ( $current_version === false ) {
|
147 |
+
if( class_exists('GFCommon') )
|
148 |
+
update_option( 'rg_form_version', GFCommon::$version );
|
149 |
+
else
|
150 |
+
update_option( 'rg_form_version', '1.9.0' );
|
151 |
+
}
|
152 |
+
|
153 |
+
}
|
154 |
+
|
155 |
+
if ( $this->is_gravity_page() ) {
|
156 |
+
|
157 |
+
if ( is_rtl() ) { ?>
|
158 |
+
<style type="text/css">
|
159 |
+
.mt-gform_notification_message,.mt-form_confirmation_message {
|
160 |
+
margin-right: -30px !important;
|
161 |
+
}
|
162 |
+
</style>
|
163 |
+
<?php } ?>
|
164 |
+
<script type="text/javascript">
|
165 |
+
jQuery(document).ready(function(){
|
166 |
+
jQuery('img').each( function() {
|
167 |
+
var title = jQuery(this).prop('title');
|
168 |
+
var alt = jQuery(this).prop('alt');
|
169 |
+
if ( typeof title !== 'undefined' && 0 != title.length && ( title == 'Unlicensed Copy' || title == 'Unlicensed Copy. Please purchase a Gravity Forms license' )
|
170 |
+
|| typeof alt !== 'undefined' && 0 != alt.length && ( alt == 'Unlicensed Copy' || alt == 'Unlicensed Copy. Please purchase a Gravity Forms license' ) ) {
|
171 |
+
jQuery(this).hide();
|
172 |
+
}
|
173 |
+
});
|
174 |
+
});
|
175 |
+
</script>
|
176 |
+
<?php
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
public function noconflict_scripts($scripts){
|
181 |
+
//$scripts[] = '';
|
182 |
+
return $scripts;
|
183 |
+
}
|
184 |
+
|
185 |
+
public function noconflict_styles($styles){
|
186 |
+
$styles[] = "gravity-forms-admin-rtl";
|
187 |
+
$styles[] = "gravity-forms-admin-yekan";
|
188 |
+
$styles[] = "gravity-forms-admin-droidsans";
|
189 |
+
$styles[] = "print_entry";
|
190 |
+
return $styles;
|
191 |
+
}
|
192 |
+
|
193 |
+
public function rss_dashboard() {
|
194 |
+
if ( current_user_can('manage_options') )
|
195 |
+
wp_add_dashboard_widget('persiangf_wd_hannanstd', __( 'Persian Gravity Forms Dashboard', 'GF_FA' ) , array( $this, 'rss_widget'));
|
196 |
+
}
|
197 |
+
|
198 |
+
public function rss_widget() {
|
199 |
+
|
200 |
+
$rss = fetch_feed( $this->feed );
|
201 |
+
|
202 |
+
if ( is_wp_error($rss) ) {
|
203 |
+
if ( is_admin() )
|
204 |
+
printf(__('<strong>RSS Error</strong>', 'GF_FA'));
|
205 |
+
return;
|
206 |
+
}
|
207 |
+
|
208 |
+
if ( ! $rss->get_item_quantity() ) {
|
209 |
+
printf(__( 'Apparently, There are no updates to show!', 'GF_FA' ));
|
210 |
+
$rss->__destruct();
|
211 |
+
unset($rss);
|
212 |
+
return;
|
213 |
+
}
|
214 |
+
|
215 |
+
$items = 5;
|
216 |
+
$i=1;
|
217 |
+
|
218 |
+
echo '<div class="rss-widget"><ul>';
|
219 |
+
foreach ( (array) $rss->get_items(0, $items) as $item ) {
|
220 |
+
$link = esc_url( strip_tags( $item->get_link() ) );
|
221 |
+
$title = esc_html( $item->get_title() );
|
222 |
+
$content = $item->get_content();
|
223 |
+
$content = wp_html_excerpt($content, 250) . ' ...';
|
224 |
+
echo '<li>';
|
225 |
+
if ($i==1)
|
226 |
+
echo "<a class='rsswidget a1' target='_blank' href='$link'>$title</a><div class='rssSummary'>$content</div><hr/>";
|
227 |
+
else
|
228 |
+
echo "<a class='rsswidget a2' target='_blank' href='$link'>$title</a>";
|
229 |
+
echo '</li>';
|
230 |
+
$i++;
|
231 |
+
}
|
232 |
+
echo '</ul></div>';
|
233 |
+
|
234 |
+
$rss->__destruct();
|
235 |
+
unset($rss);
|
236 |
+
}
|
237 |
+
|
238 |
+
|
239 |
+
public function load_translate( $mo_file, $domain ) {
|
240 |
+
|
241 |
+
if ( strpos( $mo_file, 'fa_IR.mo' ) !== false ) {
|
242 |
+
|
243 |
+
$domains = array(
|
244 |
+
'gravityformscoupons' => array(
|
245 |
+
'languages/gravityformscoupons-fa_IR.mo' => 'gravityformscoupons/fa_IR.mo'
|
246 |
+
),
|
247 |
+
'gravityformsmailchimp' => array(
|
248 |
+
'languages/gravityformsmailchimp-fa_IR.mo' => 'gravityformsmailchimp/fa_IR.mo'
|
249 |
+
),
|
250 |
+
'gravityformspolls' => array(
|
251 |
+
'languages/gravityformspolls-fa_IR.mo' => 'gravityformspolls/fa_IR.mo'
|
252 |
+
),
|
253 |
+
'gravityformsquiz' => array(
|
254 |
+
'languages/gravityformsquiz-fa_IR.mo' => 'gravityformsquiz/fa_IR.mo'
|
255 |
+
),
|
256 |
+
'gravityformssignature' => array(
|
257 |
+
'languages/gravityformssignature-fa_IR.mo' => 'gravityformssignature/fa_IR.mo'
|
258 |
+
),
|
259 |
+
'gravityformssurvey' => array(
|
260 |
+
'languages/gravityformssurvey-fa_IR.mo' => 'gravityformssurvey/fa_IR.mo'
|
261 |
+
),
|
262 |
+
'gravityformsuserregistration' => array(
|
263 |
+
'languages/gravityformsuserregistration-fa_IR.mo' => 'gravityformsuserregistration/fa_IR.mo'
|
264 |
+
),
|
265 |
+
'gravityformsauthorizenet' => array(
|
266 |
+
'languages/gravityformsauthorizenet-fa_IR.mo' => 'gravityformsauthorizenet/fa_IR.mo'
|
267 |
+
),
|
268 |
+
'gravityformsaweber' => array(
|
269 |
+
'languages/gravityformsaweber-fa_IR.mo' => 'gravityformsaweber/fa_IR.mo'
|
270 |
+
),
|
271 |
+
'gravityformscampaignmonitor' => array(
|
272 |
+
'languages/gravityformscampaignmonitor-fa_IR.mo' => 'gravityformscampaignmonitor/fa_IR.mo'
|
273 |
+
),
|
274 |
+
'gravityformsfreshbooks' => array(
|
275 |
+
'languages/gravityformsfreshbooks-fa_IR.mo' => 'gravityformsfreshbooks/fa_IR.mo'
|
276 |
+
),
|
277 |
+
'gravityformspaypal' => array(
|
278 |
+
'languages/gravityformspaypal-fa_IR.mo' => 'gravityformspaypal/fa_IR.mo'
|
279 |
+
),
|
280 |
+
'gravityformspaypalpro' => array(
|
281 |
+
'languages/gravityformspaypalpro-fa_IR.mo' => 'gravityformspaypalpro/fa_IR.mo'
|
282 |
+
),
|
283 |
+
'gravityformspaypalpaymentspro' => array(
|
284 |
+
'languages/gravityformspaypalpaymentspro-fa_IR.mo' => 'gravityformspaypalpaymentspro/fa_IR.mo'
|
285 |
+
),
|
286 |
+
'gravityformstwilio' => array(
|
287 |
+
'languages/gravityformstwilio-fa_IR.mo' => 'gravityformstwilio/fa_IR.mo'
|
288 |
+
),
|
289 |
+
'gravityformsstripe' => array(
|
290 |
+
'languages/gravityformsstripe-fa_IR.mo' => 'gravityformsstripe/fa_IR.mo'
|
291 |
+
),
|
292 |
+
'gravityformszapier' => array(
|
293 |
+
'languages/gravityformszapier-fa_IR.mo' => 'gravityformszapier/fa_IR.mo'
|
294 |
+
),
|
295 |
+
'sticky-list' => array(
|
296 |
+
'languages/sticky-list-fa_IR.mo' => 'gravityformsstickylist/fa_IR.mo'
|
297 |
+
),
|
298 |
+
'gf-limit' => array(
|
299 |
+
'gf-limit-fa_IR.mo' => 'gravityformsquantitylimits/fa_IR.mo'
|
300 |
+
),
|
301 |
+
'gf-limit' => array(
|
302 |
+
'languages/gf-limit-fa_IR.mo' => 'gravityformsquantitylimits/fa_IR.mo'
|
303 |
+
)
|
304 |
+
);
|
305 |
+
|
306 |
+
if ( $this->is_gravityforms_new() ) {
|
307 |
+
$_domain = array(
|
308 |
+
'gravityforms' => array(
|
309 |
+
'languages/gravityforms-fa_IR.mo' => 'gravityforms1.9/fa_IR.mo'
|
310 |
+
)
|
311 |
+
);
|
312 |
+
}
|
313 |
+
else {
|
314 |
+
$_domain = array(
|
315 |
+
'gravityforms' => array(
|
316 |
+
'languages/gravityforms-fa_IR.mo' => 'gravityforms1.8/fa_IR.mo'
|
317 |
+
)
|
318 |
+
);
|
319 |
+
}
|
320 |
+
|
321 |
+
$domains = array_merge($domains, $_domain);
|
322 |
+
|
323 |
+
if ( isset( $domains[$domain] ) && is_array($domains[$domain]) ) {
|
324 |
+
|
325 |
+
foreach ( $domains[$domain] as $path => $file ) {
|
326 |
+
|
327 |
+
if ( substr( $mo_file, -strlen( $path ) ) == $path ) {
|
328 |
+
$new_file = dirname( $this->file ) . '/languages/' . $file;
|
329 |
+
if ( is_readable( $new_file ) )
|
330 |
+
$mo_file = $new_file;
|
331 |
+
|
332 |
+
}
|
333 |
+
}
|
334 |
+
}
|
335 |
+
}
|
336 |
+
|
337 |
+
return $mo_file;
|
338 |
+
}
|
339 |
+
|
340 |
+
private function is_gravityforms_new(){
|
341 |
+
return class_exists('GFCommon') && version_compare(GFCommon::$version, '1.9.0', ">=");
|
342 |
+
}
|
343 |
+
|
344 |
+
|
345 |
+
public function better_noDuplicate( $count, $form_id, $field, $value ) {
|
346 |
+
|
347 |
+
global $wpdb;
|
348 |
+
|
349 |
+
$lead_detail_table_name = GFFormsModel::get_lead_details_table_name();
|
350 |
+
$lead_table_name = GFFormsModel::get_lead_table_name();
|
351 |
+
$lead_detail_long = GFFormsModel::get_lead_details_long_table_name();
|
352 |
+
$is_long = ! is_array( $value ) && strlen( $value ) > GFORMS_MAX_FIELD_LENGTH - 10;
|
353 |
+
|
354 |
+
$sql_comparison = $is_long ? '( ld.value = %s OR ldl.value = %s )' : 'ld.value = %s';
|
355 |
+
|
356 |
+
switch ( GFFormsModel::get_input_type( $field ) ) {
|
357 |
+
case 'time':
|
358 |
+
$value = sprintf( "%02d:%02d %s", $value[0], $value[1], $value[2] );
|
359 |
+
break;
|
360 |
+
case 'date':
|
361 |
+
$value = GFFormsModel::prepare_date( $field->dateFormat, $value );
|
362 |
+
break;
|
363 |
+
case 'number':
|
364 |
+
$value = GFCommon::clean_number( $value, $field->numberFormat );
|
365 |
+
break;
|
366 |
+
case 'phone':
|
367 |
+
$value = str_replace( array( ')', '(', '-', ' ' ), '', $value );
|
368 |
+
$sql_comparison = 'replace( replace( replace( replace( ld.value, ")", "" ), "(", "" ), "-", "" ), " ", "" ) = %s';
|
369 |
+
break;
|
370 |
+
case 'email':
|
371 |
+
$value = is_array( $value ) ? rgar( $value, 0 ) : $value;
|
372 |
+
break;
|
373 |
+
}
|
374 |
+
|
375 |
+
$inner_sql_template = "SELECT %s as input, ld.lead_id
|
376 |
+
FROM {$lead_detail_table_name} ld
|
377 |
+
INNER JOIN {$lead_table_name} l ON l.id = ld.lead_id\n";
|
378 |
+
|
379 |
+
if ( $is_long ) {
|
380 |
+
$inner_sql_template .= "INNER JOIN {$lead_detail_long} ldl ON ldl.lead_detail_id = ld.id\n";
|
381 |
+
}
|
382 |
+
|
383 |
+
$inner_sql_template .= "WHERE l.form_id=%d AND ld.form_id=%d
|
384 |
+
AND ld.field_number between %s AND %s
|
385 |
+
AND status='active'
|
386 |
+
AND ( LOWER(payment_status)='paid' OR LOWER(payment_status)='active'
|
387 |
+
OR LOWER(payment_status)='actived' OR LOWER(payment_status)='complete'
|
388 |
+
OR LOWER(payment_status)='completed' OR LOWER(payment_status)='complleted'
|
389 |
+
OR LOWER(payment_status)='approve' OR LOWER(payment_status)='approved'
|
390 |
+
OR LOWER(payment_status)='' OR payment_status='null' OR payment_status='NULL'
|
391 |
+
OR LOWER(payment_status)=NULL OR payment_status=null OR payment_status IS NULL )
|
392 |
+
AND {$sql_comparison}";
|
393 |
+
|
394 |
+
$sql = "SELECT count(distinct input) as match_count FROM ( ";
|
395 |
+
|
396 |
+
$input_count = 1;
|
397 |
+
if ( is_object( $field ) && is_array( $field->get_entry_inputs() ) ) {
|
398 |
+
$input_count = sizeof( $field->inputs );
|
399 |
+
foreach ( $field->inputs as $input ) {
|
400 |
+
$union = empty( $inner_sql ) ? '' : ' UNION ALL ';
|
401 |
+
$inner_sql .= $union . $wpdb->prepare( $inner_sql_template, $input['id'], $form_id, $form_id, $input['id'] - 0.0001, $input['id'] + 0.0001, $value[ $input['id'] ], $value[ $input['id'] ] );
|
402 |
+
}
|
403 |
+
} else {
|
404 |
+
$inner_sql = $wpdb->prepare( $inner_sql_template, $field->id, $form_id, $form_id, doubleval( $field->id ) - 0.0001, doubleval( $field->id ) + 0.0001, $value, $value );
|
405 |
+
}
|
406 |
+
|
407 |
+
$sql .= $inner_sql . "
|
408 |
+
) as count
|
409 |
+
GROUP BY lead_id
|
410 |
+
ORDER BY match_count DESC";
|
411 |
+
|
412 |
+
$count = gf_apply_filters( 'gform_is_duplicate_better', $form_id, $wpdb->get_var( $sql ), $form_id, $field, $value );
|
413 |
+
|
414 |
+
return $count != null && $count >= $input_count;
|
415 |
+
}
|
416 |
+
|
417 |
+
public function add_private_post_status($post_status_options) {
|
418 |
+
$post_status_options['private'] = __("Private", "GF_FA");
|
419 |
+
return $post_status_options;
|
420 |
+
}
|
421 |
+
|
422 |
+
public function iran_currencies($currencies) {
|
423 |
+
|
424 |
+
if ( empty($currencies['IRR']) ) {
|
425 |
+
$currencies['IRR'] = array(
|
426 |
+
'name' => esc_html__('Iranian Rial', 'GF_FA'),
|
427 |
+
'symbol_left' => ( ! is_rtl() ? esc_html__('Rial', 'GF_FA') : ''),
|
428 |
+
'symbol_right' => (is_rtl() ? esc_html__('Rial', 'GF_FA') : ''),
|
429 |
+
'symbol_padding' => ' ',
|
430 |
+
'thousand_separator' => ',',
|
431 |
+
'decimal_separator' => '.',
|
432 |
+
'decimals' => 0
|
433 |
+
);
|
434 |
+
}
|
435 |
+
|
436 |
+
if ( empty($currencies['IRT']) ) {
|
437 |
+
$currencies['IRT'] = array(
|
438 |
+
'name' => esc_html__('Iranian Toman', 'GF_FA'),
|
439 |
+
'symbol_left' => (! is_rtl() ? esc_html__('Toman', 'GF_FA') : ''),
|
440 |
+
'symbol_right' => (is_rtl() ? esc_html__('Toman', 'GF_FA') : ''),
|
441 |
+
'symbol_padding' => ' ',
|
442 |
+
'thousand_separator' => ',',
|
443 |
+
'decimal_separator' => '.',
|
444 |
+
'decimals' => 0
|
445 |
+
);
|
446 |
+
}
|
447 |
+
|
448 |
+
return $currencies;
|
449 |
+
}
|
450 |
+
|
451 |
+
public function predefined_choices($choices){
|
452 |
+
|
453 |
+
$month[__( 'Iranian Months', 'GF_FA' )] = array(
|
454 |
+
__( 'Farvardin', 'GF_FA' ),
|
455 |
+
__( 'Ordibehesht', 'GF_FA' ),
|
456 |
+
__( 'Khordad', 'GF_FA' ),
|
457 |
+
__( 'Tir', 'GF_FA' ),
|
458 |
+
__( 'Mordad', 'GF_FA' ),
|
459 |
+
__( 'Shahrivar', 'GF_FA' ),
|
460 |
+
__( 'Mehr', 'GF_FA' ),
|
461 |
+
__( 'Aban', 'GF_FA' ),
|
462 |
+
__( 'Azar', 'GF_FA' ),
|
463 |
+
__( 'Dey', 'GF_FA' ),
|
464 |
+
__( 'Bahman', 'GF_FA' ),
|
465 |
+
__( 'Esfand', 'GF_FA' )
|
466 |
+
);
|
467 |
+
|
468 |
+
return $choices = array_merge( $month, $choices);
|
469 |
+
}
|
470 |
+
|
471 |
+
public function merge_tags_admin($form){
|
472 |
+
|
473 |
+
$merge_tags = array(
|
474 |
+
'{payment_gateway}' => __('Simple Payment Gateway' ,'GF_FA'),
|
475 |
+
'{payment_status}' => __('Simple Payment Status' ,'GF_FA'),
|
476 |
+
'{transaction_id}' => __('Simple Transaction ID' ,'GF_FA'),
|
477 |
+
'{payment_gateway_css}' => __('Styled Payment Gateway' ,'GF_FA'),
|
478 |
+
'{payment_status_css}' => __('Styled Payment Status' ,'GF_FA'),
|
479 |
+
'{transaction_id_css}' => __('Styled Transaction ID' ,'GF_FA'),
|
480 |
+
'{payment_pack}' => __('Styled Payment Pack' ,'GF_FA'),
|
481 |
+
'{rtl_start}' => __('Start of RTL Div' ,'GF_FA'),
|
482 |
+
'{rtl_end}' => __('End of RTL Div' ,'GF_FA'),
|
483 |
+
);
|
484 |
+
?>
|
485 |
+
<script type="text/javascript">
|
486 |
+
gform.addFilter("gform_merge_tags", "add_merge_tags");
|
487 |
+
function add_merge_tags(mergeTags, elementId, hideAllFields, excludeFieldTypes, isPrepop, option){
|
488 |
+
<?php foreach ( (array) $merge_tags as $key => $val ) { ?>
|
489 |
+
mergeTags["custom"].tags.push({ tag: '<?php echo $key ?>', label: '<?php echo $val ?>' });
|
490 |
+
<?php } ?>
|
491 |
+
return mergeTags;
|
492 |
+
}
|
493 |
+
</script>
|
494 |
+
<?php
|
495 |
+
return $form;
|
496 |
+
}
|
497 |
+
|
498 |
+
|
499 |
+
|
500 |
+
public function pre_replace_merge_tags( $text, $form, $entry, $url_encode, $esc_html, $nl2br, $format ) {
|
501 |
+
|
502 |
+
preg_match_all( "/{all_fields(:(.*?))?}/", $text, $matches, PREG_SET_ORDER );
|
503 |
+
if ( is_array($matches) && !empty($matches) ) {
|
504 |
+
|
505 |
+
foreach ( $matches as $match ) {
|
506 |
+
|
507 |
+
$options = explode( ',', rgar( $match, 2 ) );
|
508 |
+
|
509 |
+
if ( in_array( 'transaction', $options ) && isset($match[0]) && ( strpos( $text, $match[0] ) !== false ) ) {
|
510 |
+
$text = str_replace( $match[0] , $match[0] . '{payment_pack}' , $text );
|
511 |
+
}
|
512 |
+
}
|
513 |
+
}
|
514 |
+
|
515 |
+
return $text;
|
516 |
+
}
|
517 |
+
|
518 |
+
public function replace_merge_tags($text, $form, $lead, $url_encode, $esc_html, $nl2br, $format){
|
519 |
+
|
520 |
+
$lead = RGFormsModel::get_lead(rgar($lead, 'id'));
|
521 |
+
|
522 |
+
$table_color = esc_attr( apply_filters( 'gform_email_background_color_table', '#EAEAEA', '', $lead ) );
|
523 |
+
$label_color = esc_attr( apply_filters( 'gform_email_background_color_label', '#EAF2FA', '', $lead ) );
|
524 |
+
$data_color = esc_attr( apply_filters( 'gform_email_background_color_data', '#FFFFFF', '', $lead ) );
|
525 |
+
|
526 |
+
$gateway = gform_get_meta( rgar($lead, 'id'), 'payment_gateway');
|
527 |
+
$gateway = !empty($gateway) ? $gateway : '';
|
528 |
+
|
529 |
+
$transaction_id = rgar($lead, 'transaction_id');
|
530 |
+
$transaction_id = !empty($transaction_id) ? $transaction_id : '';
|
531 |
+
|
532 |
+
$payment_status = strtolower(rgar($lead, 'payment_status'));
|
533 |
+
|
534 |
+
$color = '';
|
535 |
+
if ( !empty($payment_status) ) {
|
536 |
+
if( in_array( $payment_status , array( 'completed' , 'complete' , 'paid' , 'active' , 'actived' , 'approved' , 'approve' ) ) ) {
|
537 |
+
$color = 'color:#008000;';
|
538 |
+
$payment_status = __( 'Approved' , 'GF_FA');
|
539 |
+
}
|
540 |
+
else if( $payment_status == 'failed' ) {
|
541 |
+
$color = 'color:#FF0000;';
|
542 |
+
$payment_status = __( 'Failed' , 'GF_FA');
|
543 |
+
}
|
544 |
+
else if( $payment_status == 'cancelled' ) {
|
545 |
+
$color = 'color:#FFA500;';
|
546 |
+
$payment_status = __( 'Cancelled' , 'GF_FA');;
|
547 |
+
}
|
548 |
+
else {
|
549 |
+
$color = 'color:#3399FF;';
|
550 |
+
$payment_status = __( 'Processing' , 'GF_FA');;
|
551 |
+
}
|
552 |
+
}
|
553 |
+
|
554 |
+
$payment_gateway_css = !empty($gateway) ? '
|
555 |
+
<tr bgcolor="' . $label_color . '">
|
556 |
+
<td colspan="2" style="padding:5px !important">
|
557 |
+
<font style="font-family: sans-serif; font-size:12px;"><strong>' . __( 'Payment Gateway', 'GF_FA' ) . '</strong></font>
|
558 |
+
</td>
|
559 |
+
</tr>
|
560 |
+
<tr bgcolor="#FFFFFF">
|
561 |
+
<td width="20"> </td>
|
562 |
+
<td style="padding:5px !important">
|
563 |
+
<font style="font-family:sans-serif;font-size:12px">'. $gateway . ' </font>
|
564 |
+
</td>
|
565 |
+
</tr>' : '';
|
566 |
+
|
567 |
+
$transaction_id_css = !empty($transaction_id) ? '
|
568 |
+
<tr bgcolor="' . $label_color . '">
|
569 |
+
<td colspan="2" style="padding:5px !important">
|
570 |
+
<font style="font-family: sans-serif; font-size:12px;"><strong>' . __( 'Transaction ID', 'GF_FA' ) . '</strong></font>
|
571 |
+
</td>
|
572 |
+
</tr>
|
573 |
+
<tr bgcolor="#FFFFFF">
|
574 |
+
<td width="20"> </td>
|
575 |
+
<td style="padding:5px !important">
|
576 |
+
<font style="font-family:sans-serif;font-size:12px">'. $transaction_id . ' </font>
|
577 |
+
</td>
|
578 |
+
</tr>' : '';
|
579 |
+
|
580 |
+
$payment_status_css = !empty($payment_status) ? '
|
581 |
+
<tr bgcolor="' . $label_color . '">
|
582 |
+
<td colspan="2" style="padding:5px !important">
|
583 |
+
<font style="font-family: sans-serif; font-size:12px;"><strong>' . __( 'Payment Status', 'GF_FA' ) . '</strong></font>
|
584 |
+
</td>
|
585 |
+
</tr>
|
586 |
+
<tr bgcolor="#FFFFFF">
|
587 |
+
<td width="20"> </td>
|
588 |
+
<td style="padding:5px !important">
|
589 |
+
<font style="font-family:sans-serif;font-size:12px;'. $color .'">'. $payment_status . ' </font>
|
590 |
+
</td>
|
591 |
+
</tr>' : '';
|
592 |
+
|
593 |
+
|
594 |
+
$tags = array(
|
595 |
+
'{payment_gateway}',
|
596 |
+
'{transaction_id}',
|
597 |
+
'{payment_status}',
|
598 |
+
'{payment_gateway_css}',
|
599 |
+
'{transaction_id_css}',
|
600 |
+
'{payment_status_css}',
|
601 |
+
'{payment_pack}',
|
602 |
+
'{rtl_start}',
|
603 |
+
'{rtl_end}',
|
604 |
+
);
|
605 |
+
|
606 |
+
|
607 |
+
$values = array (
|
608 |
+
|
609 |
+
$gateway,
|
610 |
+
$transaction_id,
|
611 |
+
$payment_status,
|
612 |
+
|
613 |
+
$gateway ? '<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="'.$table_color.'" style="border:1px solid #e9e9e9!important;">'
|
614 |
+
. $payment_gateway_css .
|
615 |
+
'</table>' : '',
|
616 |
+
|
617 |
+
$transaction_id ? '<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="'.$table_color.'" style="border:1px solid #e9e9e9!important;">'
|
618 |
+
. $transaction_id_css .
|
619 |
+
'</table>': '',
|
620 |
+
|
621 |
+
$payment_status ? '<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="'.$table_color.'" style="border:1px solid #e9e9e9!important;">'
|
622 |
+
. $payment_status_css .
|
623 |
+
'</table>': '',
|
624 |
+
|
625 |
+
$payment_status || $transaction_id || $gateway ? '<table width="99%" border="0" cellpadding="1" cellspacing="0" bgcolor="'.$table_color.'" style="border:1px solid #e9e9e9!important;">'
|
626 |
+
. $payment_status_css . $payment_gateway_css . $transaction_id_css .
|
627 |
+
'</table>': '',
|
628 |
+
|
629 |
+
'<div style="text-align: right !important; direction: rtl !important;">',
|
630 |
+
'</div>',
|
631 |
+
);
|
632 |
+
|
633 |
+
$text = str_replace($tags, $values, $text);
|
634 |
+
|
635 |
+
return $text;
|
636 |
+
}
|
637 |
+
|
638 |
+
public function show_payment_status($form_id, $field_id, $value, $lead, $query_string) {
|
639 |
+
|
640 |
+
$admin_url = admin_url('admin.php?page=gf_entries&view=entries&id=' . $form_id);
|
641 |
+
$gateway = gform_get_meta( rgar($lead, 'id'), 'payment_gateway');
|
642 |
+
$payment_status = strtolower(rgar($lead, 'payment_status'));
|
643 |
+
|
644 |
+
if( in_array( $payment_status , array( 'completed' , 'complete' , 'paid' , 'active' , 'actived' , 'approved' , 'approve' ) ) ) {
|
645 |
+
$color = '#008000';
|
646 |
+
$status = __( 'Approved' , 'GF_FA');
|
647 |
+
}
|
648 |
+
else if( $payment_status == 'failed' ) {
|
649 |
+
$color = '#FF0000';
|
650 |
+
$status = __( 'Failed' , 'GF_FA');
|
651 |
+
}
|
652 |
+
else if( $payment_status == 'cancelled' ) {
|
653 |
+
$color = '#FFA500';
|
654 |
+
$status = __( 'Cancelled' , 'GF_FA');;
|
655 |
+
}
|
656 |
+
else {
|
657 |
+
$color = '#3399FF';
|
658 |
+
$status = __( 'Processing' , 'GF_FA');;
|
659 |
+
}
|
660 |
+
|
661 |
+
if ( !empty($payment_status) ) {
|
662 |
+
|
663 |
+
echo '<a class="status" href="'.$admin_url.'&sort=0&dir=DESC&s=Processing&field_id=payment_status&operator=is" style="color:'.$color.';"> '.$status.' </a>';
|
664 |
+
|
665 |
+
if ( !empty($gateway) )
|
666 |
+
echo ' - ';
|
667 |
+
}
|
668 |
+
|
669 |
+
if ( !empty($gateway) )
|
670 |
+
echo '<a class="status" href="'.$admin_url.'&sort=0&dir=DESC&s='.$gateway.'&field_id=payment_gateway&operator=is" style="color:#000000;"> '.$gateway.' </a>';
|
671 |
+
}
|
672 |
+
|
673 |
+
public function transaction_id($entry, $form) {
|
674 |
+
|
675 |
+
$transaction_id = apply_filters( $this->author.'_gf_rand_transaction_id', rand(1000000000,9999999999), $form , $entry );
|
676 |
+
|
677 |
+
$transaction_id = !empty($transaction_id) ? $transaction_id : '';
|
678 |
+
|
679 |
+
GFAPI::update_entry_property($entry['id'], "transaction_id", $transaction_id);
|
680 |
+
|
681 |
+
}
|
682 |
+
|
683 |
+
//تغییر کد رهگیری از این فیلتر
|
684 |
+
public function transaction_id_mask( $transaction_id , $entry, $form ) {
|
685 |
+
return $this->rand_mask( apply_filters( 'gform_transaction_id', '9999999999' , $entry, $form ) );
|
686 |
+
}
|
687 |
+
|
688 |
+
public function rand_mask( $mask ){
|
689 |
+
|
690 |
+
if ( empty($mask) )
|
691 |
+
return '';
|
692 |
+
|
693 |
+
$all_str = array();
|
694 |
+
$all_str = str_split($mask);
|
695 |
+
$transaction_id = '';
|
696 |
+
foreach ( (array) $all_str as $str ) {
|
697 |
+
if ( $str == '*' )
|
698 |
+
$transaction_id .= str_replace( $str, $this->rand_str(1), $str );
|
699 |
+
else if ( $str == '9' || $str == 9 )
|
700 |
+
$transaction_id .= str_replace( $str, rand(0,9), $str );
|
701 |
+
else if ( $str == 'a' )
|
702 |
+
$transaction_id .= str_replace( $str, $this->rand_str(2), $str );
|
703 |
+
}
|
704 |
+
return $transaction_id;
|
705 |
+
}
|
706 |
+
|
707 |
+
public function rand_str( $type = 2 ) {
|
708 |
+
$alphabet = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
709 |
+
$numbers = $type == 1 ? '0123456789' : '';
|
710 |
+
$rand = str_split(str_shuffle( $alphabet . $numbers ));
|
711 |
+
return $rand[rand(0,51)];
|
712 |
+
}
|
713 |
+
|
714 |
+
public function wp_footer() {
|
715 |
+
|
716 |
+
if( is_rtl() ) { ?>
|
717 |
+
<style type="text/css">
|
718 |
+
.gright,.gform_wrapper form ,.gform_wrapper ul li:before, .gform_wrapper ul li:after, .gform_wrapper ul.gform_fields {
|
719 |
+
text-align: right !important;
|
720 |
+
direction:rtl !important;
|
721 |
+
}
|
722 |
+
.gleft,.gform_wrapper input[type="url"], .gform_wrapper input[type="email"],
|
723 |
+
.gform_wrapper input[type="tel"], .gform_wrapper input[type="number"],
|
724 |
+
.gform_wrapper input[type="password"],body.rtl .gform_wrapper input[type="email"], body.rtl .gform_wrapper input[type="password"],
|
725 |
+
body.rtl .gform_wrapper input[type="url"], body.rtl .gform_wrapper input[type="tel"],body .gform_wrapper.gf_rtl_wrapper input[type="email"],
|
726 |
+
body .gform_wrapper.gf_rtl_wrapper input[type="password"], body .gform_wrapper.gf_rtl_wrapper input[type="url"], body .gform_wrapper.gf_rtl_wrapper input[type="tel"] {
|
727 |
+
text-align:left !important;
|
728 |
+
direction:ltr !important;
|
729 |
+
}
|
730 |
+
.gform_wrapper .ginput_complex .ginput_left {
|
731 |
+
float: right !important;
|
732 |
+
}
|
733 |
+
.gform_wrapper .ginput_complex .ginput_right {
|
734 |
+
float: left !important;
|
735 |
+
}
|
736 |
+
.gform_wrapper .ginput_complex .address_city {
|
737 |
+
float: left !important;
|
738 |
+
}
|
739 |
+
.gform_wrapper .ginput_complex .address_state , .gform_wrapper .ginput_complex .address_zip {
|
740 |
+
float: right !important;
|
741 |
+
}
|
742 |
+
.gform_wrapper .gfield_checkbox li label,
|
743 |
+
.gform_wrapper .gfield_radio li label {
|
744 |
+
margin-right:20px !important;
|
745 |
+
}
|
746 |
+
.gform_wrapper .ginput_complex.ginput_container.has_first_name.has_middle_name.has_last_name span.name_first,
|
747 |
+
.gform_wrapper .ginput_complex.ginput_container.has_first_name.has_middle_name.has_last_name span.name_middle,
|
748 |
+
.gform_wrapper .ginput_complex.ginput_container.has_first_name.no_middle_name.has_last_name span.name_first{
|
749 |
+
margin-right:0px !important;
|
750 |
+
margin-left: 1.3% !important;
|
751 |
+
}
|
752 |
+
</style>
|
753 |
+
<?php
|
754 |
+
}
|
755 |
+
}
|
756 |
+
|
757 |
+
public function print_rtl($value, $form){
|
758 |
+
|
759 |
+
if( is_rtl() ) {
|
760 |
+
wp_register_style('print_entry', GF_PARSI_URL . 'assets/css/print.rtl.css' );
|
761 |
+
return array('print_entry');
|
762 |
+
}
|
763 |
+
}
|
764 |
+
|
765 |
+
public function admin_rtl() {
|
766 |
+
|
767 |
+
if ( is_rtl() && $this->is_gravity_page() ) {
|
768 |
+
wp_register_style( 'gravity-forms-admin-rtl', GF_PARSI_URL . 'assets/css/admin.rtl.css' );
|
769 |
+
wp_enqueue_style( 'gravity-forms-admin-rtl' );
|
770 |
+
}
|
771 |
+
}
|
772 |
+
|
773 |
+
public static function get_base_url(){
|
774 |
+
return plugins_url( '', __FILE__ );
|
775 |
+
}
|
776 |
+
|
777 |
+
public static function get_mysql_tz_offset(){
|
778 |
+
|
779 |
+
$tzb = $tz = get_option('gmt_offset');
|
780 |
+
|
781 |
+
if ( intval($tz) < 0)
|
782 |
+
$pf = "-";
|
783 |
+
else
|
784 |
+
$pf = "+";
|
785 |
+
|
786 |
+
$tz = abs($tz) * 3600;
|
787 |
+
$tz = gmdate("H:i", $tz);
|
788 |
+
$tz = $pf.$tz;
|
789 |
+
|
790 |
+
$today = date('Y-m-d H:i:s');
|
791 |
+
$date = new DateTime($today);
|
792 |
+
|
793 |
+
$tzn = abs($tzb) * 3600;
|
794 |
+
$tzh = intval(gmdate("H", $tzn));
|
795 |
+
$tzm = intval(gmdate("i", $tzn));
|
796 |
+
|
797 |
+
if ( intval($tzb) < 0)
|
798 |
+
$date->sub(new DateInterval('P0DT'.$tzh.'H'.$tzm.'M'));
|
799 |
+
else
|
800 |
+
$date->add(new DateInterval('P0DT'.$tzh.'H'.$tzm.'M'));
|
801 |
+
|
802 |
+
$today = $date->format('Y-m-d H:i:s');
|
803 |
+
$today = strtotime ($today);
|
804 |
+
return array("tz" => $tz, "today" => $today);
|
805 |
+
}
|
806 |
+
|
807 |
+
}
|
808 |
+
|
809 |
+
global $gf_parsi;
|
810 |
+
$gf_parsi = new GFParsi();
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Persian Gravity Forms ===
|
2 |
Contributors: hannanstd
|
3 |
Tags: gravityforms,gravity forms,persian gravity forms,persian gravityforms,gravityforms farsi,gravity forms farsi,rtl,fa_ir,iranian,iranian rials,iranian toman,iran state,gravityforms.ir,gravity forms payment,gravity forms gateway,gravity forms iran gateways
|
4 |
-
Donate link: http://
|
5 |
-
Requires at least:
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag:
|
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 .
|
@@ -13,229 +13,182 @@ This WordPress plugin extends the Gravity Forms plugin and its addons with the P
|
|
13 |
**Persian Gravity Forms**
|
14 |
This plugin extends the Gravity Forms and its addons with Persian language
|
15 |
|
|
|
16 |
= Features =
|
17 |
-
*
|
18 |
-
*
|
19 |
-
*
|
20 |
-
*
|
21 |
-
*
|
22 |
-
*
|
23 |
-
*
|
24 |
-
*
|
25 |
-
*
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
* ترجمه هسته افزونه و ادان های آن ...
|
30 |
-
* اضافه کردن استان های ایران برای استفاده در فیلد های آدرس و ...
|
31 |
-
* اضافه کردن واحد پولی ریال و تومان
|
32 |
-
* زیبا سازی محیط کاربری به وسیله استایل دهی و ...
|
33 |
-
* اضافه کردن فیلد کد ملی ایران ، این فیلد کد ملی نادرست را برطبق استانداردهای کشور تشخیص داده و از ثبت شدن آن جلوگیری میکند . همچنین این فیلد دارای تنظیمات پیشرفته تری نیز می باشد
|
34 |
-
* راستچین سازی افزونه و صفحه پرینت و ادان ها و ...
|
35 |
-
* اضافه کردن وضعیت پست خصوصی برای فیلد های ارسال پست .
|
36 |
-
* اضافه کردن برچسب وضعیت تراکنش ، کد رهگیری و ... به برچسب های ایمیل و صفحه تاییدیه که این برچسب در خود افزونه وجود نداشت .
|
37 |
-
* افزونه درگاه های ایرانی آن نیز به صورت جدا عرضه خواهد شد ....
|
38 |
-
* قرار دادن کد رهگیری برای تمامی فرم ها
|
39 |
-
* رسم نمودار شمسی برای درگاه های پرداخت
|
40 |
-
* ....
|
41 |
|
42 |
= Compatibility =
|
43 |
-
*
|
44 |
-
*
|
|
|
45 |
|
46 |
-
= Support =
|
47 |
-
* [Persian Support in GravityForms.ir](http://GravityForms.ir/)
|
48 |
|
49 |
== Installation ==
|
50 |
-
1.
|
51 |
-
2.
|
52 |
-
3.
|
53 |
-
4. Enjoy It :)
|
54 |
|
55 |
-
== Frequently asked questions ==
|
56 |
|
57 |
-
|
58 |
-
Also yes .
|
59 |
|
60 |
-
=
|
61 |
-
|
62 |
|
|
|
|
|
63 |
|
64 |
== Screenshots ==
|
|
|
65 |
|
66 |
-
01. Forms in wordpress dashboard.
|
67 |
-
02. Forms list
|
68 |
-
03. Adding new form
|
69 |
-
04. Fields list
|
70 |
-
05. Form setting page
|
71 |
-
06. form confirmation actions
|
72 |
-
07. form confirmation emails
|
73 |
-
08. plugins setting page
|
74 |
-
09. entries list
|
75 |
-
10. entries detail
|
76 |
-
11. coupons
|
77 |
-
12. post fields
|
78 |
-
13. front end.
|
79 |
-
14. Iran states
|
80 |
-
15. Iran states
|
81 |
-
16. Iranian National Code field
|
82 |
-
17. Iranian National Code field Standard setting
|
83 |
-
18. Iranian National Code field in front-end
|
84 |
-
19. Iranian National Code field Advanced setting
|
85 |
|
86 |
== Changelog ==
|
|
|
|
|
|
|
|
|
87 |
= 1.8.0 =
|
88 |
-
*
|
89 |
-
*
|
90 |
= 1.7.5 =
|
91 |
-
*
|
92 |
= 1.7.4 =
|
93 |
-
*
|
94 |
= 1.7.3 =
|
95 |
-
*
|
|
|
96 |
= 1.7.2 =
|
97 |
-
*
|
98 |
= 1.7.1 =
|
99 |
-
*
|
100 |
= 1.7.0 =
|
101 |
-
*
|
102 |
= 1.6.0 =
|
103 |
-
*
|
104 |
= 1.5.0 =
|
105 |
-
*
|
106 |
-
*
|
107 |
= 1.4.7 =
|
108 |
-
*
|
109 |
= 1.4.6 =
|
110 |
-
*
|
111 |
= 1.4.5 =
|
112 |
-
*
|
113 |
= 1.4.4 =
|
114 |
-
*
|
115 |
= 1.4.3 =
|
116 |
-
*
|
117 |
= 1.4.2 =
|
118 |
-
*
|
119 |
= 1.4.1 =
|
120 |
-
*
|
121 |
= 1.4.0 =
|
122 |
-
*
|
123 |
-
* compatible with noconflict mode
|
124 |
-
* added plugin translation
|
125 |
-
* update translation file
|
126 |
-
* Fixed : wp_session fatal error
|
127 |
= 1.3.2 =
|
128 |
-
*
|
129 |
= 1.3.1 =
|
130 |
-
*
|
131 |
-
*
|
132 |
-
* Added Gravity Form Sticky List Translate
|
133 |
-
* Improve Transactions Security Levels
|
134 |
-
* Source Code Cleaned up
|
135 |
= 1.3.0 =
|
136 |
-
*
|
137 |
= 1.2.0 =
|
138 |
-
*
|
139 |
= 1.1.5 =
|
140 |
-
*
|
141 |
= 1.1.4 =
|
142 |
-
*
|
143 |
= 1.1.3 =
|
144 |
-
*
|
145 |
= 1.1.2 =
|
146 |
-
*
|
147 |
-
*
|
148 |
-
* Support custom page for callback url
|
149 |
-
* Fixed some css bugs
|
150 |
-
* Added wp_session class for more security
|
151 |
-
* Added Jquery flot for transaction graph
|
152 |
-
* Added Jalali Class for transaction graph
|
153 |
= 1.1.1 =
|
154 |
-
*
|
155 |
-
* See Screenshots 16-19
|
156 |
= 1.0.2 =
|
157 |
-
*
|
158 |
= 1.0.1 =
|
159 |
-
*
|
160 |
= 1.0.0 =
|
161 |
-
*
|
162 |
|
163 |
== Upgrade Notice ==
|
|
|
|
|
|
|
|
|
164 |
= 1.8.0 =
|
165 |
-
*
|
166 |
-
*
|
167 |
= 1.7.5 =
|
168 |
-
*
|
169 |
= 1.7.4 =
|
170 |
-
*
|
171 |
= 1.7.3 =
|
172 |
-
*
|
|
|
173 |
= 1.7.2 =
|
174 |
-
*
|
175 |
= 1.7.1 =
|
176 |
-
*
|
177 |
= 1.7.0 =
|
178 |
-
*
|
179 |
= 1.6.0 =
|
180 |
-
*
|
181 |
= 1.5.0 =
|
182 |
-
*
|
183 |
-
*
|
184 |
= 1.4.7 =
|
185 |
-
*
|
186 |
= 1.4.6 =
|
187 |
-
*
|
188 |
= 1.4.5 =
|
189 |
-
*
|
190 |
= 1.4.4 =
|
191 |
-
*
|
192 |
= 1.4.3 =
|
193 |
-
*
|
194 |
= 1.4.2 =
|
195 |
-
*
|
196 |
= 1.4.1 =
|
197 |
-
*
|
198 |
= 1.4.0 =
|
199 |
-
*
|
200 |
-
* compatible with noconflict mode
|
201 |
-
* added plugin translation
|
202 |
-
* update translation file
|
203 |
-
* Fixed : wp_session fatal error
|
204 |
= 1.3.2 =
|
205 |
-
*
|
206 |
= 1.3.1 =
|
207 |
-
*
|
208 |
-
*
|
209 |
-
* Added Gravity Form Sticky List Translate
|
210 |
-
* Improve Transactions Security Levels
|
211 |
-
* Source Code Cleaned up
|
212 |
= 1.3.0 =
|
213 |
-
*
|
214 |
= 1.2.0 =
|
215 |
-
*
|
216 |
= 1.1.5 =
|
217 |
-
*
|
218 |
= 1.1.4 =
|
219 |
-
*
|
220 |
= 1.1.3 =
|
221 |
-
*
|
222 |
= 1.1.2 =
|
223 |
-
*
|
224 |
-
*
|
225 |
-
* Support custom page for callback url
|
226 |
-
* Fixed some css bugs
|
227 |
-
* Added wp_session class for more security
|
228 |
-
* Added Jquery flot for transaction graph
|
229 |
-
* Added Jalali Class for transaction graph
|
230 |
= 1.1.1 =
|
231 |
-
*
|
232 |
-
* See Screenshots 16-19
|
233 |
= 1.0.2 =
|
234 |
-
*
|
235 |
= 1.0.1 =
|
236 |
-
*
|
237 |
= 1.0.0 =
|
238 |
-
*
|
239 |
|
240 |
==Traducciones ==
|
241 |
-
|
1 |
=== Persian Gravity Forms ===
|
2 |
Contributors: hannanstd
|
3 |
Tags: gravityforms,gravity forms,persian gravity forms,persian gravityforms,gravityforms farsi,gravity forms farsi,rtl,fa_ir,iranian,iranian rials,iranian toman,iran state,gravityforms.ir,gravity forms payment,gravity forms gateway,gravity forms iran gateways
|
4 |
+
Donate link: http://gravityforms.ir
|
5 |
+
Requires at least: 4.0
|
6 |
+
Tested up to: 4.4.4
|
7 |
+
Stable tag: 2.0.0
|
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 .
|
13 |
**Persian Gravity Forms**
|
14 |
This plugin extends the Gravity Forms and its addons with Persian language
|
15 |
|
16 |
+
|
17 |
= Features =
|
18 |
+
* بسته کامل ایرانی ساز گراویتی فرم
|
19 |
+
* ترجمه گراویتی فرم و افزونه های جانبی
|
20 |
+
* راستچین سازی مدیریت و فرم ها
|
21 |
+
* استان های ایران
|
22 |
+
* شهرهای ایران
|
23 |
+
* فیلد کد ملی هوشمند
|
24 |
+
* دیت پیکر و تاریخ شمسی
|
25 |
+
* پیش نیاز وهسته مرکزی درگاه های پرداخت
|
26 |
+
* واحد پولی ریال و تومان
|
27 |
+
* اسنیپت های بکار رفته کاربردی
|
28 |
+
* امکانات فراوان دیگر
|
29 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
= Compatibility =
|
32 |
+
* وردپرس 4
|
33 |
+
* هسته گراویتی فرم
|
34 |
+
* برای تهیه هسته گراویتی فرم کلیک نمایید [GravityForms.com](https://www.e-junkie.com/ecom/gb.php?cl=54585&c=ib&aff=301821)
|
35 |
|
|
|
|
|
36 |
|
37 |
== Installation ==
|
38 |
+
1. ابتدای هسته گراویتی فرم را نصب نمایید
|
39 |
+
2. سپس بسته فارسی ساز را یا از مخزن یا به صورت دستی همانند سایر پلاگین ها نصب نمایید
|
40 |
+
3. پلاگین را فعال نموده و لذت ببرید
|
|
|
41 |
|
|
|
42 |
|
43 |
+
== Frequently asked questions ==
|
|
|
44 |
|
45 |
+
= آیا گراویتی فرم در ایران سایت پشتیبانی دارد =
|
46 |
+
بله میتوانید به سایت گراویتی فرم پارسی مراجعه نمایید [GravityForms.ir](http://www.GravityForms.ir)
|
47 |
|
48 |
+
= آیا سایت گراویتی فرم پارسی ،هسته گراویتی فرم را نیز به فروش می رسانید =
|
49 |
+
خیر به هیچ وجه! برای خرید گراویتی فرم تنها از طریق سایت رسمی آن خرید نمایید [GravityForms.com](https://www.e-junkie.com/ecom/gb.php?cl=54585&c=ib&aff=301821)
|
50 |
|
51 |
== Screenshots ==
|
52 |
+
به زودی با تصاویر جدید !
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
== Changelog ==
|
56 |
+
= 2.0.0 =
|
57 |
+
* بازنویسی مجدد
|
58 |
+
* اضافه شدن شهر های ایران
|
59 |
+
* رفع مشکلات
|
60 |
= 1.8.0 =
|
61 |
+
* اضافه کردن ویژگی های جدید
|
62 |
+
* بروز رسانی ترجمه
|
63 |
= 1.7.5 =
|
64 |
+
* رفع باگ
|
65 |
= 1.7.4 =
|
66 |
+
* رفع باگ
|
67 |
= 1.7.3 =
|
68 |
+
* اضافه کردن ویژگی های جدید
|
69 |
+
* بروز رسانی ترجمه
|
70 |
= 1.7.2 =
|
71 |
+
* بروز رسانی ترجمه
|
72 |
= 1.7.1 =
|
73 |
+
* بهبود راستچین سازی
|
74 |
= 1.7.0 =
|
75 |
+
* ویژگی های جدید
|
76 |
= 1.6.0 =
|
77 |
+
* ویژگی های جدید
|
78 |
= 1.5.0 =
|
79 |
+
* بروز رسانی ترجمه
|
80 |
+
* دکمه پیشنمایش زنده
|
81 |
= 1.4.7 =
|
82 |
+
* رفع باگ
|
83 |
= 1.4.6 =
|
84 |
+
* رفع مشکل ترجمه
|
85 |
= 1.4.5 =
|
86 |
+
* بهبود استایل دکمه رادیویی و چک باکس در راستچین سازی
|
87 |
= 1.4.4 =
|
88 |
+
* بروز رسانی ترجمه
|
89 |
= 1.4.3 =
|
90 |
+
* رفع باگ
|
91 |
= 1.4.2 =
|
92 |
+
* بهبود راستچین سازی
|
93 |
= 1.4.1 =
|
94 |
+
* رفع باگ
|
95 |
= 1.4.0 =
|
96 |
+
* سازگاری با نسخه 1.9 گراویتی فرم
|
|
|
|
|
|
|
|
|
97 |
= 1.3.2 =
|
98 |
+
* رفع باگ
|
99 |
= 1.3.1 =
|
100 |
+
* بهبود ترجمه
|
101 |
+
* رفع باگ
|
|
|
|
|
|
|
102 |
= 1.3.0 =
|
103 |
+
* رفع باگ
|
104 |
= 1.2.0 =
|
105 |
+
* ایجاد اعتبار سنجی تاریخ شمسی
|
106 |
= 1.1.5 =
|
107 |
+
* رفع باگ
|
108 |
= 1.1.4 =
|
109 |
+
* رفع باگ
|
110 |
= 1.1.3 =
|
111 |
+
* رفع باگ
|
112 |
= 1.1.2 =
|
113 |
+
* نمودار شمسی تراکنش ها
|
114 |
+
* کد پیگیری فرم ها
|
|
|
|
|
|
|
|
|
|
|
115 |
= 1.1.1 =
|
116 |
+
* اضافه شدن کد ملی
|
|
|
117 |
= 1.0.2 =
|
118 |
+
* رفع باگ
|
119 |
= 1.0.1 =
|
120 |
+
* رفع باگ
|
121 |
= 1.0.0 =
|
122 |
+
* انتشار نسخه اولیه
|
123 |
|
124 |
== Upgrade Notice ==
|
125 |
+
= 2.0.0 =
|
126 |
+
* بازنویسی مجدد
|
127 |
+
* اضافه شدن شهر های ایران
|
128 |
+
* رفع مشکلات
|
129 |
= 1.8.0 =
|
130 |
+
* اضافه کردن ویژگی های جدید
|
131 |
+
* بروز رسانی ترجمه
|
132 |
= 1.7.5 =
|
133 |
+
* رفع باگ
|
134 |
= 1.7.4 =
|
135 |
+
* رفع باگ
|
136 |
= 1.7.3 =
|
137 |
+
* اضافه کردن ویژگی های جدید
|
138 |
+
* بروز رسانی ترجمه
|
139 |
= 1.7.2 =
|
140 |
+
* بروز رسانی ترجمه
|
141 |
= 1.7.1 =
|
142 |
+
* بهبود راستچین سازی
|
143 |
= 1.7.0 =
|
144 |
+
* ویژگی های جدید
|
145 |
= 1.6.0 =
|
146 |
+
* ویژگی های جدید
|
147 |
= 1.5.0 =
|
148 |
+
* بروز رسانی ترجمه
|
149 |
+
* دکمه پیشنمایش زنده
|
150 |
= 1.4.7 =
|
151 |
+
* رفع باگ
|
152 |
= 1.4.6 =
|
153 |
+
* رفع مشکل ترجمه
|
154 |
= 1.4.5 =
|
155 |
+
* بهبود استایل دکمه رادیویی و چک باکس در راستچین سازی
|
156 |
= 1.4.4 =
|
157 |
+
* بروز رسانی ترجمه
|
158 |
= 1.4.3 =
|
159 |
+
* رفع باگ
|
160 |
= 1.4.2 =
|
161 |
+
* بهبود راستچین سازی
|
162 |
= 1.4.1 =
|
163 |
+
* رفع باگ
|
164 |
= 1.4.0 =
|
165 |
+
* سازگاری با نسخه 1.9 گراویتی فرم
|
|
|
|
|
|
|
|
|
166 |
= 1.3.2 =
|
167 |
+
* رفع باگ
|
168 |
= 1.3.1 =
|
169 |
+
* بهبود ترجمه
|
170 |
+
* رفع باگ
|
|
|
|
|
|
|
171 |
= 1.3.0 =
|
172 |
+
* رفع باگ
|
173 |
= 1.2.0 =
|
174 |
+
* ایجاد اعتبار سنجی تاریخ شمسی
|
175 |
= 1.1.5 =
|
176 |
+
* رفع باگ
|
177 |
= 1.1.4 =
|
178 |
+
* رفع باگ
|
179 |
= 1.1.3 =
|
180 |
+
* رفع باگ
|
181 |
= 1.1.2 =
|
182 |
+
* نمودار شمسی تراکنش ها
|
183 |
+
* کد پیگیری فرم ها
|
|
|
|
|
|
|
|
|
|
|
184 |
= 1.1.1 =
|
185 |
+
* اضافه شدن کد ملی
|
|
|
186 |
= 1.0.2 =
|
187 |
+
* رفع باگ
|
188 |
= 1.0.1 =
|
189 |
+
* رفع باگ
|
190 |
= 1.0.0 =
|
191 |
+
* انتشار نسخه اولیه
|
192 |
|
193 |
==Traducciones ==
|
194 |
+
در صورت نیاز به راهنمایی به سایت گراویتی فرم پارسی مراجعه نمایید [GravityForms.ir](http://www.GravityForms.ir)
|