Shortlinks by Pretty Links – Best WordPress Link Tracking Plugin - Version 1.1.0

Version Description

Download this release

Release Info

Developer supercleanse
Plugin Icon 128x128 Shortlinks by Pretty Links – Best WordPress Link Tracking Plugin
Version 1.1.0
Comparing to
See all releases

Version 1.1.0

Files changed (89) hide show
  1. classes/models/PrliLink.php +147 -0
  2. classes/models/PrliReport.php +112 -0
  3. classes/models/PrliUtils.php +114 -0
  4. classes/models/models.inc.php +9 -0
  5. classes/views/prli-links/edit.php +31 -0
  6. classes/views/prli-links/list.php +58 -0
  7. classes/views/prli-links/new.php +31 -0
  8. classes/views/prli-reports/form.php +30 -0
  9. classes/views/shared/errors.php +19 -0
  10. classes/views/shared/table-nav.php +93 -0
  11. images/bookmark.png +0 -0
  12. images/pretty-link-add.png +0 -0
  13. images/pretty-link-med.png +0 -0
  14. images/pretty-link-small.png +0 -0
  15. images/url_icon.gif +0 -0
  16. includes/jquery/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  17. includes/jquery/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  18. includes/jquery/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  19. includes/jquery/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  20. includes/jquery/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  21. includes/jquery/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  22. includes/jquery/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  23. includes/jquery/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  24. includes/jquery/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  25. includes/jquery/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  26. includes/jquery/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  27. includes/jquery/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  28. includes/jquery/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  29. includes/jquery/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  30. includes/jquery/css/ui-lightness/jquery-ui-1.7.1.custom.css +404 -0
  31. includes/jquery/js/jquery-1.3.2.min.js +19 -0
  32. includes/jquery/js/jquery-ui-1.7.1.custom.min.js +273 -0
  33. includes/version-2-ichor/README.txt +8 -0
  34. includes/version-2-ichor/js/README.txt +12 -0
  35. includes/version-2-ichor/js/json/json2.js +461 -0
  36. includes/version-2-ichor/js/swfobject.js +5 -0
  37. includes/version-2-ichor/open-flash-chart.swf +0 -0
  38. includes/version-2-ichor/php-ofc-library/JSON.php +806 -0
  39. includes/version-2-ichor/php-ofc-library/README.txt +16 -0
  40. includes/version-2-ichor/php-ofc-library/dot_base.php +231 -0
  41. includes/version-2-ichor/php-ofc-library/json_format.php +86 -0
  42. includes/version-2-ichor/php-ofc-library/ofc_area_base.php +40 -0
  43. includes/version-2-ichor/php-ofc-library/ofc_area_hollow.php +10 -0
  44. includes/version-2-ichor/php-ofc-library/ofc_area_line.php +10 -0
  45. includes/version-2-ichor/php-ofc-library/ofc_bar.php +34 -0
  46. includes/version-2-ichor/php-ofc-library/ofc_bar_3d.php +22 -0
  47. includes/version-2-ichor/php-ofc-library/ofc_bar_base.php +78 -0
  48. includes/version-2-ichor/php-ofc-library/ofc_bar_filled.php +39 -0
  49. includes/version-2-ichor/php-ofc-library/ofc_bar_glass.php +109 -0
  50. includes/version-2-ichor/php-ofc-library/ofc_bar_sketch.php +29 -0
  51. includes/version-2-ichor/php-ofc-library/ofc_bar_stack.php +50 -0
  52. includes/version-2-ichor/php-ofc-library/ofc_hbar.php +64 -0
  53. includes/version-2-ichor/php-ofc-library/ofc_line.php +115 -0
  54. includes/version-2-ichor/php-ofc-library/ofc_line_base.php +92 -0
  55. includes/version-2-ichor/php-ofc-library/ofc_line_dot.php +33 -0
  56. includes/version-2-ichor/php-ofc-library/ofc_line_hollow.php +9 -0
  57. includes/version-2-ichor/php-ofc-library/ofc_line_style.php +11 -0
  58. includes/version-2-ichor/php-ofc-library/ofc_menu.php +56 -0
  59. includes/version-2-ichor/php-ofc-library/ofc_pie.php +257 -0
  60. includes/version-2-ichor/php-ofc-library/ofc_radar_axis.php +47 -0
  61. includes/version-2-ichor/php-ofc-library/ofc_radar_axis_labels.php +15 -0
  62. includes/version-2-ichor/php-ofc-library/ofc_radar_spoke_labels.php +15 -0
  63. includes/version-2-ichor/php-ofc-library/ofc_scatter.php +47 -0
  64. includes/version-2-ichor/php-ofc-library/ofc_scatter_line.php +43 -0
  65. includes/version-2-ichor/php-ofc-library/ofc_shape.php +25 -0
  66. includes/version-2-ichor/php-ofc-library/ofc_sugar.php +43 -0
  67. includes/version-2-ichor/php-ofc-library/ofc_title.php +39 -0
  68. includes/version-2-ichor/php-ofc-library/ofc_tooltip.php +67 -0
  69. includes/version-2-ichor/php-ofc-library/ofc_upload_image.php +70 -0
  70. includes/version-2-ichor/php-ofc-library/ofc_x_axis.php +104 -0
  71. includes/version-2-ichor/php-ofc-library/ofc_x_axis_label.php +45 -0
  72. includes/version-2-ichor/php-ofc-library/ofc_x_axis_labels.php +46 -0
  73. includes/version-2-ichor/php-ofc-library/ofc_x_legend.php +15 -0
  74. includes/version-2-ichor/php-ofc-library/ofc_y_axis.php +17 -0
  75. includes/version-2-ichor/php-ofc-library/ofc_y_axis_base.php +131 -0
  76. includes/version-2-ichor/php-ofc-library/ofc_y_axis_right.php +6 -0
  77. includes/version-2-ichor/php-ofc-library/ofc_y_legend.php +15 -0
  78. includes/version-2-ichor/php-ofc-library/open-flash-chart-object.php +109 -0
  79. includes/version-2-ichor/php-ofc-library/open-flash-chart.php +174 -0
  80. pretty-link.php +252 -0
  81. prli-config.php +10 -0
  82. prli-links.php +98 -0
  83. prli-reports.php +9 -0
  84. prli.php +39 -0
  85. readme.txt +45 -0
  86. screenshot-1.png +0 -0
  87. screenshot-2.png +0 -0
  88. screenshot-3.png +0 -0
  89. screenshot-4.png +0 -0
classes/models/PrliLink.php ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class PrliLink
3
+ {
4
+ public $table_name;
5
+
6
+ public function __construct()
7
+ {
8
+ global $wpdb;
9
+ $this->table_name = $wpdb->prefix . 'prli_links';
10
+ }
11
+
12
+ public function tableName()
13
+ {
14
+ return $this->table_name;
15
+ }
16
+
17
+ public function create( $values )
18
+ {
19
+ global $wpdb, $wp_rewrite;
20
+ $query = 'INSERT INTO ' . $this->table_name .
21
+ ' (url,slug,created_at) VALUES (\'' .
22
+ $values['url'] . '\',\'' .
23
+ $values['slug'] . '\',' .
24
+ 'NOW())';
25
+ $query_results = $wpdb->query($query);
26
+ $wp_rewrite->flush_rules();
27
+ return $query_results;
28
+ }
29
+
30
+ public function update( $id, $values )
31
+ {
32
+ global $wpdb, $wp_rewrite;
33
+ $query = 'UPDATE ' . $this->table_name .
34
+ ' SET url=\'' . $values['url'] . '\', ' .
35
+ ' slug=\'' . $values['slug'] . '\' ' .
36
+ 'WHERE id='.$id;
37
+ $query_results = $wpdb->query($query);
38
+ $wp_rewrite->flush_rules();
39
+ return $query_results;
40
+ }
41
+
42
+ public function destroy( $id )
43
+ {
44
+ require_once(PRLI_MODELS_PATH.'/models.inc.php');
45
+ global $wpdb, $wp_rewrite;
46
+ $destroy = 'DELETE FROM ' . $this->table_name . ' WHERE id=' . $id;
47
+ $wp_rewrite->flush_rules();
48
+ return $wpdb->query($destroy);
49
+ }
50
+
51
+ public function getOne( $id )
52
+ {
53
+ global $wpdb;
54
+ $click_table = $wpdb->prefix . "prli_clicks";
55
+ $query = 'SELECT li.*, (SELECT COUNT(*) FROM ' . $click_table . ' cl WHERE cl.link_id = li.id) as clicks FROM ' . $this->table_name . ' li WHERE id=' . $id . ';';
56
+ return $wpdb->get_row($query);
57
+ }
58
+
59
+ public function getAll()
60
+ {
61
+ global $wpdb;
62
+ $click_table = $wpdb->prefix . "prli_clicks";
63
+ $query = 'SELECT li.*, (SELECT COUNT(*) FROM ' . $click_table . ' cl WHERE cl.link_id = li.id) as clicks FROM ' . $this->table_name . ' li;';
64
+ return $wpdb->get_results($query);
65
+ }
66
+
67
+ // Pagination Methods
68
+ public function getRecordCount($where="")
69
+ {
70
+ global $wpdb;
71
+ $query = 'SELECT COUNT(*) FROM ' . $this->table_name . $where;
72
+ return $wpdb->get_var($query);
73
+ }
74
+
75
+ public function getPageCount($p_size, $where="")
76
+ {
77
+ return ceil((int)$this->getRecordCount($where) / (int)$p_size);
78
+ }
79
+
80
+ public function getPage($current_p,$p_size, $where = "")
81
+ {
82
+ global $wpdb;
83
+ $click_table = $wpdb->prefix . "prli_clicks";
84
+ $end_index = $current_p * $p_size;
85
+ $start_index = $end_index - $p_size;
86
+ $query = 'SELECT li.*, (SELECT COUNT(*) FROM ' . $click_table . ' cl WHERE cl.link_id = li.id) as clicks FROM ' . $this->table_name . ' li' . $where . ' LIMIT ' . $start_index . ',' . $p_size . ';';
87
+ $results = $wpdb->get_results($query);
88
+ return $results;
89
+ }
90
+
91
+ /** I'm generating a slug that is by default 2-3 characters long.
92
+ * This gives us a possibility of 36^3 - 37 = 46,619 possible
93
+ * random slugs. That should be *more* than enough slugs for
94
+ * any website -- if I get any feedback that we need more then
95
+ * I can always make a config option to raise the # of chars.
96
+ */
97
+ public function generateValidSlug($num_chars = 3)
98
+ {
99
+ global $wpdb, $prli_utils;
100
+
101
+ // We're doing a base 36 hash which is why we're always doing everything by 36
102
+ $max_slug_value = pow(36,$num_chars);
103
+ $min_slug_value = 37; // we want to have at least 2 characters in the slug
104
+ $slug = base_convert( rand($min_slug_value,$max_slug_value), 10, 36 );
105
+
106
+ $query = "SELECT slug FROM " . $this->table_name; // . " WHERE slug='" . $slug . "'";
107
+ $slugs = $wpdb->get_col($query,0);
108
+
109
+ // It is highly unlikely that we'll ever see 2 identical random slugs
110
+ // but just in case, here's some code to prevent collisions
111
+ while( in_array($slug,$slugs) or !$prli_utils->slugIsAvailable($slug) )
112
+ $slug = base_convert( rand($min_slug_value,$max_slug_value), 10, 36 );
113
+
114
+ return $slug;
115
+ }
116
+
117
+ public function validate( $values )
118
+ {
119
+ global $wpdb, $prli_utils;
120
+
121
+ $errors = array();
122
+ if( $values['url'] == null or $values['url'] == '' )
123
+ $errors[] = "Link URL can't be blank";
124
+
125
+ if( $values['slug'] == null or $values['slug'] == '' )
126
+ $errors[] = "Pretty Link can't be blank";
127
+
128
+ if( !preg_match('/^http.?:\/\/.*\..*$/', $values['url'] ) )
129
+ $errors[] = "Link URL must be a correctly formatted url";
130
+
131
+ if( !preg_match('/^[a-z0-9\.\-_]+$/', $values['slug'] ) )
132
+ $errors[] = "Pretty Link must not contain spaces or special characters";
133
+
134
+ if($values['id'] != null and $values['id'] != '')
135
+ $query = "SELECT slug FROM " . $this->table_name . " WHERE slug='" . $values['slug'] . "' AND id <> " . $values['id'];
136
+ else
137
+ $query = "SELECT slug FROM " . $this->table_name . " WHERE slug='" . $values['slug'] . "'";
138
+
139
+ $slug_already_exists = $wpdb->get_var($query);
140
+
141
+ if( $slug_already_exists or !$prli_utils->slugIsAvailable($values['slug']) )
142
+ $errors[] = "This pretty link slug is already taken, please choose a different one";
143
+
144
+ return $errors;
145
+ }
146
+ };
147
+ ?>
classes/models/PrliReport.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ include PRLI_PATH.'/includes/version-2-ichor/php-ofc-library/open-flash-chart.php';
4
+
5
+ class PrliReport {
6
+
7
+ public function setupClickReport($start_timestamp,$end_timestamp, $link_id = "all", $type = "all")
8
+ {
9
+ global $wpdb, $prli_utils;
10
+
11
+ $clicks_table = $wpdb->prefix . "prli_clicks";
12
+ $links_table = $wpdb->prefix . "prli_links";
13
+
14
+ // Scrub times and leave the dates
15
+ $start_timestamp = mktime(0, 0, 0, date('n', $start_timestamp), date('j', $start_timestamp), date('Y', $start_timestamp));
16
+ $end_timestamp = mktime(0, 0, 0, date('n', $end_timestamp), date('j', $end_timestamp), date('Y', $end_timestamp) );
17
+
18
+ $day_timestamp = $start_timestamp;
19
+ $data_array = array();
20
+
21
+ while($day_timestamp <= ($end_timestamp + 60*60*24))
22
+ {
23
+ $dyear = date('Y',$day_timestamp);
24
+ $dmon = date('n',$day_timestamp);
25
+ $ddom = date('j',$day_timestamp);
26
+
27
+ $query = "SELECT count(*) FROM $clicks_table c2 WHERE c2.created_at BETWEEN '$dyear-$dmon-$ddom 00:00:00' AND '$dyear-$dmon-$ddom 23:59:59'";
28
+
29
+ if($link_id != "all")
30
+ {
31
+ $query .= " AND link_id=$link_id";
32
+ }
33
+
34
+ if($type == "unique")
35
+ {
36
+ $query .= " AND first_click=1";
37
+ }
38
+
39
+ $data_array[date("Y-n-j",$day_timestamp)] = (int)$wpdb->get_var($query);
40
+ $day_timestamp += 60*60*24; // Advance one day
41
+ }
42
+
43
+ $top_click_count = $prli_utils->getTopValue(array_values($data_array));
44
+
45
+ if($link_id == "all")
46
+ $link_slug = "all links";
47
+ else
48
+ $link_slug = "'".$wpdb->get_var("SELECT slug FROM $links_table WHERE id=$link_id") . "' link";
49
+
50
+ if($type == "all")
51
+ $type_string = "All clicks";
52
+ else
53
+ $type_string = "Unique clicks";
54
+
55
+ $title = new title('Pretty Link: '.$type_string.' on '.$link_slug. ' between ' . date("Y-n-j",$start_timestamp) . ' and ' . date("Y-n-j",$end_timestamp));
56
+
57
+ $title->set_style('font-size: 16px; font-weight: bold; color: #3030d0; text-align: center; padding-bottom: 5px;');
58
+
59
+ $default_dot = new dot();
60
+ $default_dot->size(4);
61
+ //$default_dot->rotation(-15);
62
+ //$default_dot->hollow(false);
63
+ $default_dot->colour('#ffc94e');
64
+ $default_dot->halo_size(1);
65
+ $default_dot->tooltip( '#val# Clicks' );
66
+
67
+ $line = new line();
68
+ $line->set_default_dot_style($default_dot);
69
+ $line->set_values( array_values($data_array) );
70
+ $line->set_width(2);
71
+
72
+ $y = new y_axis();
73
+ $y->set_range( 0, $top_click_count, (int)(($top_click_count>=10)?$top_click_count/10:1) );
74
+ $y->set_colour( '#A2ACBA' );
75
+
76
+ $chart = new open_flash_chart();
77
+ $chart->set_title( $title );
78
+ $chart->set_bg_colour("-1");
79
+ $chart->set_y_axis( $y );
80
+ $chart->add_element( $line );
81
+
82
+ $x_labels = new x_axis_labels();
83
+ $x_labels->set_steps( 2 );
84
+ $x_labels->rotate(45);
85
+ $x_labels->set_colour( '#000000' );
86
+ $x_labels->set_labels( array_keys($data_array) );
87
+
88
+ $x = new x_axis();
89
+ $x->set_colour( '#A2ACBA' );
90
+ $x->set_grid_colour( '#ffefa7' );
91
+ $x->set_offset( false );
92
+ $x->set_steps(4);
93
+
94
+ // Add the X Axis Labels to the X Axis
95
+ $x->set_labels( $x_labels );
96
+ $chart->set_x_axis( $x );
97
+
98
+ /*
99
+ $title = new title( date("D M d Y") );
100
+
101
+ $bar = new bar();
102
+ $bar->set_values( array(9,8,7,6,5,4,3,2,1) );
103
+
104
+ $chart = new open_flash_chart();
105
+ $chart->set_title( $title );
106
+ $chart->add_element( $bar );
107
+
108
+ */
109
+ return $chart->toPrettyString();
110
+ }
111
+
112
+ };
classes/models/PrliUtils.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once 'models.inc.php';
3
+
4
+ class PrliUtils
5
+ {
6
+
7
+ /** Okay I realize that Percentagize isn't really a word but
8
+ * this is so that the values we have will work with google
9
+ * charts.
10
+ */
11
+ public function percentagizeArray($data,$max_value)
12
+ {
13
+ $new_data = array();
14
+ foreach($data as $point)
15
+ {
16
+ if( $max_value > 0 )
17
+ {
18
+ $new_data[] = $point / $max_value * 100;
19
+ }
20
+ else
21
+ {
22
+ $new_data[] = 0;
23
+ }
24
+ }
25
+ return $new_data;
26
+ }
27
+
28
+ public function getTopValue($values_array)
29
+ {
30
+ rsort($values_array);
31
+ return $values_array[0];
32
+ }
33
+
34
+ public function getFirstClickDate()
35
+ {
36
+ global $wpdb;
37
+
38
+ $clicks_table = $wpdb->prefix . "prli_clicks";
39
+ $query = "SELECT created_at FROM $clicks_table ORDER BY created_at LIMIT 1";
40
+ $first_click = $wpdb->get_var($query);
41
+
42
+ if(isset($first_click))
43
+ {
44
+ return strtotime($first_click);
45
+ }
46
+ else
47
+ return null;
48
+ }
49
+
50
+ public function getMonthsArray()
51
+ {
52
+ global $wpdb;
53
+ global $prli_click;
54
+
55
+ $months = array();
56
+ $year = date("Y");
57
+ $month = date("m");
58
+ $current_timestamp = time();
59
+ $current_month_timestamp = mktime(0, 0, 0, date("m", $current_timestamp), 1, date("Y", $current_timestamp));
60
+
61
+ $clicks_table = $prli_click->tableName();
62
+ $first_click = $wpdb->get_var("SELECT created_at FROM $clicks_table ORDER BY created_at LIMIT 1;");
63
+ $first_timestamp = ((empty($first_click))?$current_timestamp:strtotime($first_click));
64
+ $first_date = mktime(0, 0, 0, date("m", $first_timestamp), 1, date("Y", $first_timestamp));
65
+
66
+ while($current_month_timestamp >= $first_date)
67
+ {
68
+ $months[] = $current_month_timestamp;
69
+ if(date("m") == 1)
70
+ {
71
+ $current_month_timestamp = mktime(0, 0, 0, 12, 1, date("Y", $current_month_timestamp)-1);
72
+ }
73
+ else
74
+ {
75
+ $current_month_timestamp = mktime(0, 0, 0, date("m", $current_month_timestamp)-1, 1, date("Y", $current_month_timestamp));
76
+ }
77
+ }
78
+ return $months;
79
+ }
80
+
81
+ // For Pagination
82
+ public function getLastRecordNum($r_count,$current_p,$p_size)
83
+ {
84
+ return (($r_count < ($current_p * $p_size))?$r_count:($current_p * $p_size));
85
+ }
86
+
87
+ // For Pagination
88
+ public function getFirstRecordNum($r_count,$current_p,$p_size)
89
+ {
90
+ if($current_p == 1)
91
+ {
92
+ return 1;
93
+ }
94
+ else
95
+ {
96
+ return ($this->getLastRecordNum($r_count,($current_p - 1),$p_size) + 1);
97
+ }
98
+ }
99
+
100
+ public function slugIsAvailable($slug)
101
+ {
102
+ global $wpdb;
103
+
104
+ $posts_table = $wpdb->prefix . "posts";
105
+ $terms_table = $wpdb->prefix . "terms";
106
+
107
+ $post_slug = $wpdb->get_var("SELECT post_name FROM $posts_table WHERE post_name='$slug'");
108
+ $term_slug = $wpdb->get_col("SELECT slug FROM $terms_table WHERE slug='$slug'");
109
+
110
+ return ( $post_slug != $slug and $term_slug != $slug );
111
+ }
112
+
113
+ };
114
+ ?>
classes/models/models.inc.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once(PRLI_MODELS_PATH.'/PrliLink.php');
3
+ require_once(PRLI_MODELS_PATH.'/PrliReport.php');
4
+ require_once(PRLI_MODELS_PATH.'/PrliUtils.php');
5
+
6
+ $prli_link = new PrliLink();
7
+ $prli_report = new PrliReport();
8
+ $prli_utils = new PrliUtils();
9
+ ?>
classes/views/prli-links/edit.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap">
2
+ <h2><img src="<?php echo PRLI_URL.'/images/pretty-link-med.png'; ?>"/>&nbsp;Pretty Link: Edit Link</h2>
3
+
4
+ <?php
5
+ require(PRLI_VIEWS_PATH.'/shared/errors.php');
6
+ ?>
7
+
8
+ <form name="form1" method="post" action="?page=<?php print PRLI_PLUGIN_NAME ?>/prli-links.php">
9
+ <input type="hidden" name="action" value="update">
10
+ <input type="hidden" name="id" value="<?php print $id; ?>">
11
+ <?php wp_nonce_field('update-options'); ?>
12
+
13
+ <table class="form-table">
14
+ <tr>
15
+ <td width="75px" valign="top">URL*: </td>
16
+ <td><input type="text" name="url" value="<?php print (($_POST['url'] != null and $record == null)?$_POST['url']:$record->url); ?>" size="75">
17
+ <br/><span class="setting-description">Enter the URL you want to mask and track. Don't forget to start your url with <code>http://</code> or <code>https://</code>. Example: <code>http://www.yoururl.com</code></span></td>
18
+ </tr>
19
+ <tr>
20
+ <td valign="top">Pretty Link*: </td>
21
+ <td><strong><?php print get_option('siteurl'); ?></strong>/<input type="text" name="slug" value="<?php print (($_POST['slug'] != null and $record == null)?$_POST['slug']:$record->slug); ?>" size="25">
22
+ <br/><span class="setting-description">Enter the slug (word trailing your main URL) that will form your pretty link and redirect to the URL above.</span></td>
23
+ </tr>
24
+ </table>
25
+
26
+ <p class="submit">
27
+ <input type="submit" name="Submit" value="Update" />&nbsp;or&nbsp;<a href="?page=<?php print PRLI_PLUGIN_NAME ?>/prli-links.php">Cancel</a>
28
+ </p>
29
+
30
+ </form>
31
+ </div>
classes/views/prli-links/list.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap">
2
+ <h2><img src="<?php echo PRLI_URL.'/images/pretty-link-med.png'; ?>"/>&nbsp;Pretty Link: Links</h2>
3
+ <p>Get started by <a href="?page=<?php print PRLI_PLUGIN_NAME; ?>/prli-links.php&action=new">adding a URL</a> that you want to turn into a pretty link. Come back to check how many times it was clicked.</p>
4
+ <p><a href="?page=<?php print PRLI_PLUGIN_NAME; ?>/prli-links.php&action=new"><img src="<?php echo PRLI_URL.'/images/pretty-link-add.png'; ?>"/> Add a Pretty Link</a></p>
5
+ <?php
6
+ require(PRLI_VIEWS_PATH.'/shared/table-nav.php');
7
+ ?>
8
+ <table class="widefat post fixed" cellspacing="0">
9
+ <thead>
10
+ <tr>
11
+ <th class="manage-column" width="10%">Slug</th>
12
+ <th class="manage-column" width="45%">URL</th>
13
+ <th class="manage-column" width="25%">Pretty Link</th>
14
+ <th class="manage-column" width="5%">Clicks</th>
15
+ <th class="manage-column" width="5%">Destroy</th>
16
+ </tr>
17
+ </thead>
18
+ <?php
19
+
20
+ if(count($links) <= 0)
21
+ {
22
+ ?>
23
+ <tr>
24
+ <td colspan="5"><a href="?page=<?php print PRLI_PLUGIN_NAME; ?>/prli-links.php&action=new"><img src="<?php echo PRLI_URL.'/images/pretty-link-add.png'; ?>"/> Add your First Pretty Link</a></td>
25
+ </tr>
26
+ <?php
27
+ }
28
+ else
29
+ {
30
+ foreach($links as $link)
31
+ {
32
+ ?>
33
+ <tr>
34
+ <td><a href="?page=<?php print PRLI_PLUGIN_NAME; ?>/prli-links.php&action=edit&id=<?php print $link->id; ?>"><?php print $link->slug; ?></a></td>
35
+ <td><a href="<? print $link->url; ?>" target="_blank" title="Visit URL in New Window"><img src="<?php echo PRLI_URL.'/images/url_icon.gif'; ?>" name="Visit" alt="Visit"/></a>&nbsp;&nbsp;<? print $link->url; ?></td>
36
+ <td><input type='text' style="font-size: 10px;" readonly="true" onclick='this.select();' onfocus='this.select();' value='<?php echo get_option('siteurl') . '/' . $link->slug; ?>' size="30" /></td>
37
+ <td><?php print $link->clicks; ?></td>
38
+ <td><a href="?page=<?php print PRLI_PLUGIN_NAME; ?>/prli-links.php&action=destroy&id=<?php print $link->id; ?>" onclick="return confirm('Are you sure you want to delete this link?');">Destroy</a></td>
39
+ </tr>
40
+ <?php
41
+ }
42
+ }
43
+ ?>
44
+ <tfoot>
45
+ <tr>
46
+ <th class="manage-column">Slug</th>
47
+ <th class="manage-column">URL</th>
48
+ <th class="manage-column">Pretty Link</th>
49
+ <th class="manage-column">Clicks</th>
50
+ <th class="manage-column">Destroy</th>
51
+ </tr>
52
+ </tfoot>
53
+ </table>
54
+ <?php
55
+ require(PRLI_VIEWS_PATH.'/shared/table-nav.php');
56
+ ?>
57
+
58
+ </div>
classes/views/prli-links/new.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap">
2
+ <h2><img src="<?php echo PRLI_URL.'/images/pretty-link-med.png'; ?>"/>&nbsp;Pretty Link: Add Link</h2>
3
+
4
+ <?php
5
+ require(PRLI_VIEWS_PATH.'/shared/errors.php');
6
+ ?>
7
+
8
+ <form name="form1" method="post" action="?page=<?php print PRLI_PLUGIN_NAME ?>/prli-links.php">
9
+ <input type="hidden" name="action" value="create">
10
+ <?php wp_nonce_field('update-options'); ?>
11
+ <input type="hidden" name="id" value="<?php print $id; ?>">
12
+
13
+ <table class="form-table">
14
+ <tr>
15
+ <td width="75px" valign="top">URL*: </td>
16
+ <td><input type="text" name="url" value="<?php print (($_POST['url'] != null)?$_POST['url']:''); ?>" size="75">
17
+ <br/><span class="setting-description">Enter the URL you want to mask and track. Don't forget to start your url with <code>http://</code> or <code>https://</code>. Example: <code>http://www.yoururl.com</code></span></td>
18
+ </tr>
19
+ <tr>
20
+ <td valign="top">Pretty Link*: </td>
21
+ <td><strong><?php print get_option('siteurl'); ?></strong>/<input type="text" name="slug" value="<?php print (($_POST['slug'] != null)?$_POST['slug']:$prli_link->generateValidSlug()); ?>" size="25">
22
+ <br/><span class="setting-description">Use the auto-generated short slug (2-3 characters) here or enter any word (must only contain letters, numbers or the following special characters: ".","-" or "_") that will form your pretty link and redirect to the URL above. Just refresh this page to auto-generate another slug.</span></td>
23
+ </tr>
24
+ </table>
25
+
26
+ <p class="submit">
27
+ <input type="submit" name="Submit" value="Create" />&nbsp;or&nbsp;<a href="?page=<?php print PRLI_PLUGIN_NAME ?>/prli-links.php">Cancel</a>
28
+ </p>
29
+
30
+ </form>
31
+ </div>
classes/views/prli-reports/form.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap">
2
+ <h2><img src="<?php echo PRLI_URL.'/images/pretty-link-med.png'; ?>"/>&nbsp;Pretty Link: Reports</h2>
3
+ <form class="form-fields" name="form2" method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>">
4
+ <?php wp_nonce_field('prli-reports'); ?>
5
+ <span>Date Range:</span>
6
+ <div id="dateselectors" style="display: inline;">
7
+ <input type="text" name="sdate" id="sdate" value="<?php echo $_POST['sdate']; ?>" style="display:inline;"/>&nbsp;to&nbsp;<input type="text" name="edate" id="edate" value="<?php echo $_POST['edate']; ?>" style="display:inline;"/>
8
+ </div><br/><br/>
9
+ <span>Link:</span>&nbsp;
10
+ <select id="link" name="link" style="display: inline;">
11
+ <option value="all"<?php print ((!isset($_POST['link']) or $_POST['link'] == "all")?" selected=\"true\"":""); ?>>All&nbsp;</option>
12
+ <?php
13
+ foreach($prli_link->getAll() as $link)
14
+ {
15
+ ?>
16
+ <option value="<?php print $link->id; ?>"<?php print (($_POST['link'] == $link->id)?" selected=\"true\"":""); ?>><?php print $link->slug; ?>&nbsp;</option>
17
+ <?php
18
+ }
19
+ ?>
20
+ </select>&nbsp;
21
+ <span>Type:</span>&nbsp;
22
+ <select id="type" name="type" style="display: inline;">
23
+ <option value="all"<?php print ((!isset($_POST['type']) or $_POST['type'] == "all")?" selected=\"true\"":""); ?>>All Clicks&nbsp;</option>
24
+ <option value="unique"<?php print (($_POST['type'] == "unique")?" selected=\"true\"":""); ?>>Unique Clicks&nbsp;</option>
25
+ </select>
26
+ <div class="submit" style="display: inline;"><input type="submit" name="Submit" value="Submit"/></div>
27
+ </form>
28
+ <br/>
29
+ <div id="my_chart"></div>
30
+ </div>
classes/views/shared/errors.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if( $errors != null and count($errors) > 0 )
3
+ {
4
+ ?>
5
+ <div class="error">
6
+ <ul>
7
+ <?php
8
+ foreach( $errors as $error )
9
+ {
10
+ ?>
11
+ <li><strong>ERROR</strong>: <?php print $error; ?></li>
12
+ <?php
13
+ }
14
+ ?>
15
+ </ul>
16
+ </div>
17
+ <?php
18
+ }
19
+ ?>
classes/views/shared/table-nav.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Only show the pager bar if there is more than 1 page
3
+ if($page_count > 1)
4
+ {
5
+ ?>
6
+ <div class="tablenav">
7
+ <div class='tablenav-pages'><span class="displaying-num">Displaying <?php print "$page_first_record&#8211;$page_last_record of $record_count"; ?></span>
8
+
9
+ <?php
10
+ // Only show the prev page button if the current page is not the first page
11
+ if($current_page > 1)
12
+ {
13
+ ?>
14
+ <a class='prev page-numbers' href='?page=<?php print PRLI_PLUGIN_NAME; ?>/<?php print $controller_file . $page_params; ?>&paged=<?php print($current_page-1); ?>'>&laquo;</a>
15
+ <?php
16
+ }
17
+
18
+ // First page is always displayed
19
+ if($current_page==1)
20
+ {
21
+ ?>
22
+ <span class='page-numbers current'>1</span>
23
+ <?php
24
+ }
25
+ else
26
+ {
27
+ ?>
28
+ <a class='page-numbers' href='?page=<?php print PRLI_PLUGIN_NAME; ?>/<?php print $controller_file . $page_params; ?>&paged=1'>1</a>
29
+ <?php
30
+ }
31
+
32
+ // If the current page is more than 2 spaces away from the first page then we put some dots in here
33
+ if($current_page >= 5)
34
+ {
35
+ ?>
36
+ <span class='page-numbers dots'>...</span>
37
+ <?php
38
+ }
39
+
40
+ // display the current page icon and the 2 pages beneath and above it
41
+ $low_page = (($current_page >= 5)?($current_page-2):2);
42
+ $high_page = ((($current_page + 2) < ($page_count-1))?($current_page+2):($page_count-1));
43
+ for($i = $low_page; $i <= $high_page; $i++)
44
+ {
45
+ if($current_page==$i)
46
+ {
47
+ ?>
48
+ <span class='page-numbers current'><?php print $i; ?></span>
49
+ <?php
50
+ }
51
+ else
52
+ {
53
+ ?>
54
+ <a class='page-numbers' href='?page=<?php print PRLI_PLUGIN_NAME; ?>/<?php print $controller_file . $page_params; ?>&paged=<?php print $i; ?>'><?php print $i; ?></a>
55
+ <?php
56
+ }
57
+ }
58
+
59
+ // If the current page is more than 2 away from the last page then show ellipsis
60
+ if($current_page < ($page_count - 3))
61
+ {
62
+ ?>
63
+ <span class='page-numbers dots'>...</span>
64
+ <?php
65
+ }
66
+
67
+ // Display the last page icon
68
+ if($current_page == $page_count)
69
+ {
70
+ ?>
71
+ <span class='page-numbers current'><?php print $page_count; ?></span>
72
+ <?php
73
+ }
74
+ else
75
+ {
76
+ ?>
77
+ <a class='page-numbers' href='?page=<?php print PRLI_PLUGIN_NAME; ?>/<?php print $controller_file . $page_params; ?>&paged=<?php print $page_count; ?>'><?php print $page_count; ?></a>
78
+ <?php
79
+ }
80
+
81
+ // Display the next page icon if there is a next page
82
+ if($current_page < $page_count)
83
+ {
84
+ ?>
85
+ <a class='next page-numbers' href='?page=<?php print PRLI_PLUGIN_NAME; ?>/<?php print $controller_file . $page_params; ?>&paged=<?php print($current_page + 1); ?>'>&raquo;</a>
86
+ <?php
87
+ }
88
+ ?>
89
+ </div>
90
+ </div>
91
+ <?php
92
+ }
93
+ ?>
images/bookmark.png ADDED
Binary file
images/pretty-link-add.png ADDED
Binary file
images/pretty-link-med.png ADDED
Binary file
images/pretty-link-small.png ADDED
Binary file
images/url_icon.gif ADDED
Binary file
includes/jquery/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png ADDED
Binary file
includes/jquery/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png ADDED
Binary file
includes/jquery/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png ADDED
Binary file
includes/jquery/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png ADDED
Binary file
includes/jquery/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png ADDED
Binary file
includes/jquery/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png ADDED
Binary file
includes/jquery/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png ADDED
Binary file
includes/jquery/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png ADDED
Binary file
includes/jquery/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png ADDED
Binary file
includes/jquery/css/ui-lightness/images/ui-icons_222222_256x240.png ADDED
Binary file
includes/jquery/css/ui-lightness/images/ui-icons_228ef1_256x240.png ADDED
Binary file
includes/jquery/css/ui-lightness/images/ui-icons_ef8c08_256x240.png ADDED
Binary file
includes/jquery/css/ui-lightness/images/ui-icons_ffd27a_256x240.png ADDED
Binary file
includes/jquery/css/ui-lightness/images/ui-icons_ffffff_256x240.png ADDED
Binary file
includes/jquery/css/ui-lightness/jquery-ui-1.7.1.custom.css ADDED
@@ -0,0 +1,404 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery UI CSS Framework
3
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
4
+ * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
5
+ */
6
+
7
+ /* Layout helpers
8
+ ----------------------------------*/
9
+ .ui-helper-hidden { display: none; }
10
+ .ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
11
+ .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
12
+ .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
13
+ .ui-helper-clearfix { display: inline-block; }
14
+ /* required comment for clearfix to work in Opera \*/
15
+ * html .ui-helper-clearfix { height:1%; }
16
+ .ui-helper-clearfix { display:block; }
17
+ /* end clearfix */
18
+ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
19
+
20
+
21
+ /* Interaction Cues
22
+ ----------------------------------*/
23
+ .ui-state-disabled { cursor: default !important; }
24
+
25
+
26
+ /* Icons
27
+ ----------------------------------*/
28
+
29
+ /* states and images */
30
+ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
31
+
32
+
33
+ /* Misc visuals
34
+ ----------------------------------*/
35
+
36
+ /* Overlays */
37
+ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
38
+
39
+ /*
40
+ * jQuery UI CSS Framework
41
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
42
+ * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
43
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
44
+ */
45
+
46
+
47
+ /* Component containers
48
+ ----------------------------------*/
49
+ .ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; }
50
+ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; }
51
+ .ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; }
52
+ .ui-widget-content a { color: #333333; }
53
+ .ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
54
+ .ui-widget-header a { color: #ffffff; }
55
+
56
+ /* Interaction states
57
+ ----------------------------------*/
58
+ .ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; outline: none; }
59
+ .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; outline: none; }
60
+ .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; outline: none; }
61
+ .ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; outline: none; }
62
+ .ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; outline: none; }
63
+ .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; outline: none; text-decoration: none; }
64
+
65
+ /* Interaction Cues
66
+ ----------------------------------*/
67
+ .ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; }
68
+ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; }
69
+ .ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; }
70
+ .ui-state-error a, .ui-widget-content .ui-state-error a { color: #ffffff; }
71
+ .ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #ffffff; }
72
+ .ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
73
+ .ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; }
74
+ .ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
75
+
76
+ /* Icons
77
+ ----------------------------------*/
78
+
79
+ /* states and images */
80
+ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
81
+ .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
82
+ .ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
83
+ .ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); }
84
+ .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
85
+ .ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
86
+ .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); }
87
+ .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); }
88
+
89
+ /* positioning */
90
+ .ui-icon-carat-1-n { background-position: 0 0; }
91
+ .ui-icon-carat-1-ne { background-position: -16px 0; }
92
+ .ui-icon-carat-1-e { background-position: -32px 0; }
93
+ .ui-icon-carat-1-se { background-position: -48px 0; }
94
+ .ui-icon-carat-1-s { background-position: -64px 0; }
95
+ .ui-icon-carat-1-sw { background-position: -80px 0; }
96
+ .ui-icon-carat-1-w { background-position: -96px 0; }
97
+ .ui-icon-carat-1-nw { background-position: -112px 0; }
98
+ .ui-icon-carat-2-n-s { background-position: -128px 0; }
99
+ .ui-icon-carat-2-e-w { background-position: -144px 0; }
100
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
101
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
102
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
103
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
104
+ .ui-icon-triangle-1-s { background-position: -64px -16px; }
105
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
106
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
107
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
108
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
109
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
110
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
111
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
112
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
113
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
114
+ .ui-icon-arrow-1-s { background-position: -64px -32px; }
115
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
116
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
117
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
118
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
119
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
120
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
121
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
122
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
123
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
124
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
125
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
126
+ .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
127
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
128
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
129
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
130
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
131
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
132
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
133
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
134
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
135
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
136
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
137
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
138
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
139
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
140
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
141
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
142
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
143
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
144
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
145
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
146
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
147
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
148
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
149
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
150
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
151
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
152
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
153
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
154
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
155
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
156
+ .ui-icon-extlink { background-position: -32px -80px; }
157
+ .ui-icon-newwin { background-position: -48px -80px; }
158
+ .ui-icon-refresh { background-position: -64px -80px; }
159
+ .ui-icon-shuffle { background-position: -80px -80px; }
160
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
161
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
162
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
163
+ .ui-icon-folder-open { background-position: -16px -96px; }
164
+ .ui-icon-document { background-position: -32px -96px; }
165
+ .ui-icon-document-b { background-position: -48px -96px; }
166
+ .ui-icon-note { background-position: -64px -96px; }
167
+ .ui-icon-mail-closed { background-position: -80px -96px; }
168
+ .ui-icon-mail-open { background-position: -96px -96px; }
169
+ .ui-icon-suitcase { background-position: -112px -96px; }
170
+ .ui-icon-comment { background-position: -128px -96px; }
171
+ .ui-icon-person { background-position: -144px -96px; }
172
+ .ui-icon-print { background-position: -160px -96px; }
173
+ .ui-icon-trash { background-position: -176px -96px; }
174
+ .ui-icon-locked { background-position: -192px -96px; }
175
+ .ui-icon-unlocked { background-position: -208px -96px; }
176
+ .ui-icon-bookmark { background-position: -224px -96px; }
177
+ .ui-icon-tag { background-position: -240px -96px; }
178
+ .ui-icon-home { background-position: 0 -112px; }
179
+ .ui-icon-flag { background-position: -16px -112px; }
180
+ .ui-icon-calendar { background-position: -32px -112px; }
181
+ .ui-icon-cart { background-position: -48px -112px; }
182
+ .ui-icon-pencil { background-position: -64px -112px; }
183
+ .ui-icon-clock { background-position: -80px -112px; }
184
+ .ui-icon-disk { background-position: -96px -112px; }
185
+ .ui-icon-calculator { background-position: -112px -112px; }
186
+ .ui-icon-zoomin { background-position: -128px -112px; }
187
+ .ui-icon-zoomout { background-position: -144px -112px; }
188
+ .ui-icon-search { background-position: -160px -112px; }
189
+ .ui-icon-wrench { background-position: -176px -112px; }
190
+ .ui-icon-gear { background-position: -192px -112px; }
191
+ .ui-icon-heart { background-position: -208px -112px; }
192
+ .ui-icon-star { background-position: -224px -112px; }
193
+ .ui-icon-link { background-position: -240px -112px; }
194
+ .ui-icon-cancel { background-position: 0 -128px; }
195
+ .ui-icon-plus { background-position: -16px -128px; }
196
+ .ui-icon-plusthick { background-position: -32px -128px; }
197
+ .ui-icon-minus { background-position: -48px -128px; }
198
+ .ui-icon-minusthick { background-position: -64px -128px; }
199
+ .ui-icon-close { background-position: -80px -128px; }
200
+ .ui-icon-closethick { background-position: -96px -128px; }
201
+ .ui-icon-key { background-position: -112px -128px; }
202
+ .ui-icon-lightbulb { background-position: -128px -128px; }
203
+ .ui-icon-scissors { background-position: -144px -128px; }
204
+ .ui-icon-clipboard { background-position: -160px -128px; }
205
+ .ui-icon-copy { background-position: -176px -128px; }
206
+ .ui-icon-contact { background-position: -192px -128px; }
207
+ .ui-icon-image { background-position: -208px -128px; }
208
+ .ui-icon-video { background-position: -224px -128px; }
209
+ .ui-icon-script { background-position: -240px -128px; }
210
+ .ui-icon-alert { background-position: 0 -144px; }
211
+ .ui-icon-info { background-position: -16px -144px; }
212
+ .ui-icon-notice { background-position: -32px -144px; }
213
+ .ui-icon-help { background-position: -48px -144px; }
214
+ .ui-icon-check { background-position: -64px -144px; }
215
+ .ui-icon-bullet { background-position: -80px -144px; }
216
+ .ui-icon-radio-off { background-position: -96px -144px; }
217
+ .ui-icon-radio-on { background-position: -112px -144px; }
218
+ .ui-icon-pin-w { background-position: -128px -144px; }
219
+ .ui-icon-pin-s { background-position: -144px -144px; }
220
+ .ui-icon-play { background-position: 0 -160px; }
221
+ .ui-icon-pause { background-position: -16px -160px; }
222
+ .ui-icon-seek-next { background-position: -32px -160px; }
223
+ .ui-icon-seek-prev { background-position: -48px -160px; }
224
+ .ui-icon-seek-end { background-position: -64px -160px; }
225
+ .ui-icon-seek-first { background-position: -80px -160px; }
226
+ .ui-icon-stop { background-position: -96px -160px; }
227
+ .ui-icon-eject { background-position: -112px -160px; }
228
+ .ui-icon-volume-off { background-position: -128px -160px; }
229
+ .ui-icon-volume-on { background-position: -144px -160px; }
230
+ .ui-icon-power { background-position: 0 -176px; }
231
+ .ui-icon-signal-diag { background-position: -16px -176px; }
232
+ .ui-icon-signal { background-position: -32px -176px; }
233
+ .ui-icon-battery-0 { background-position: -48px -176px; }
234
+ .ui-icon-battery-1 { background-position: -64px -176px; }
235
+ .ui-icon-battery-2 { background-position: -80px -176px; }
236
+ .ui-icon-battery-3 { background-position: -96px -176px; }
237
+ .ui-icon-circle-plus { background-position: 0 -192px; }
238
+ .ui-icon-circle-minus { background-position: -16px -192px; }
239
+ .ui-icon-circle-close { background-position: -32px -192px; }
240
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
241
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
242
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
243
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
244
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
245
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
246
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
247
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
248
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
249
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
250
+ .ui-icon-circle-check { background-position: -208px -192px; }
251
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
252
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
253
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
254
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
255
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
256
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
257
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
258
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
259
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
260
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
261
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
262
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
263
+
264
+
265
+ /* Misc visuals
266
+ ----------------------------------*/
267
+
268
+ /* Corner radius */
269
+ .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; }
270
+ .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; }
271
+ .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; }
272
+ .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; }
273
+ .ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; }
274
+ .ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; }
275
+ .ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; }
276
+ .ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; }
277
+ .ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; }
278
+
279
+ /* Overlays */
280
+ .ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); }
281
+ .ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; }/* Accordion
282
+ ----------------------------------*/
283
+ .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
284
+ .ui-accordion .ui-accordion-li-fix { display: inline; }
285
+ .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
286
+ .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; }
287
+ .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
288
+ .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; }
289
+ .ui-accordion .ui-accordion-content-active { display: block; }/* Datepicker
290
+ ----------------------------------*/
291
+ .ui-datepicker { width: 17em; padding: .2em .2em 0; }
292
+ .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
293
+ .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
294
+ .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
295
+ .ui-datepicker .ui-datepicker-prev { left:2px; }
296
+ .ui-datepicker .ui-datepicker-next { right:2px; }
297
+ .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
298
+ .ui-datepicker .ui-datepicker-next-hover { right:1px; }
299
+ .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
300
+ .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
301
+ .ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; }
302
+ .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
303
+ .ui-datepicker select.ui-datepicker-month,
304
+ .ui-datepicker select.ui-datepicker-year { width: 49%;}
305
+ .ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; }
306
+ .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
307
+ .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
308
+ .ui-datepicker td { border: 0; padding: 1px; }
309
+ .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
310
+ .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
311
+ .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
312
+ .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
313
+
314
+ /* with multiple calendars */
315
+ .ui-datepicker.ui-datepicker-multi { width:auto; }
316
+ .ui-datepicker-multi .ui-datepicker-group { float:left; }
317
+ .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
318
+ .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
319
+ .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
320
+ .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
321
+ .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
322
+ .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
323
+ .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
324
+ .ui-datepicker-row-break { clear:both; width:100%; }
325
+
326
+ /* RTL support */
327
+ .ui-datepicker-rtl { direction: rtl; }
328
+ .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
329
+ .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
330
+ .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
331
+ .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
332
+ .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
333
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
334
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
335
+ .ui-datepicker-rtl .ui-datepicker-group { float:right; }
336
+ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
337
+ .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
338
+
339
+ /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
340
+ .ui-datepicker-cover {
341
+ display: none; /*sorry for IE5*/
342
+ display/**/: block; /*sorry for IE5*/
343
+ position: absolute; /*must have*/
344
+ z-index: -1; /*must have*/
345
+ filter: mask(); /*must have*/
346
+ top: -4px; /*must have*/
347
+ left: -4px; /*must have*/
348
+ width: 200px; /*must have*/
349
+ height: 200px; /*must have*/
350
+ }/* Dialog
351
+ ----------------------------------*/
352
+ .ui-dialog { position: relative; padding: .2em; width: 300px; }
353
+ .ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; }
354
+ .ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; }
355
+ .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
356
+ .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
357
+ .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
358
+ .ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
359
+ .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
360
+ .ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
361
+ .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
362
+ .ui-draggable .ui-dialog-titlebar { cursor: move; }
363
+ /* Progressbar
364
+ ----------------------------------*/
365
+ .ui-progressbar { height:2em; text-align: left; }
366
+ .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable
367
+ ----------------------------------*/
368
+ .ui-resizable { position: relative;}
369
+ .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
370
+ .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
371
+ .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; }
372
+ .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; }
373
+ .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; }
374
+ .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; }
375
+ .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
376
+ .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
377
+ .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
378
+ .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider
379
+ ----------------------------------*/
380
+ .ui-slider { position: relative; text-align: left; }
381
+ .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
382
+ .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; }
383
+
384
+ .ui-slider-horizontal { height: .8em; }
385
+ .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
386
+ .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
387
+ .ui-slider-horizontal .ui-slider-range-min { left: 0; }
388
+ .ui-slider-horizontal .ui-slider-range-max { right: 0; }
389
+
390
+ .ui-slider-vertical { width: .8em; height: 100px; }
391
+ .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
392
+ .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
393
+ .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
394
+ .ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs
395
+ ----------------------------------*/
396
+ .ui-tabs { padding: .2em; zoom: 1; }
397
+ .ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
398
+ .ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; }
399
+ .ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; }
400
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; }
401
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
402
+ .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
403
+ .ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
404
+ .ui-tabs .ui-tabs-hide { display: none !important; }
includes/jquery/js/jquery-1.3.2.min.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery JavaScript Library v1.3.2
3
+ * http://jquery.com/
4
+ *
5
+ * Copyright (c) 2009 John Resig
6
+ * Dual licensed under the MIT and GPL licenses.
7
+ * http://docs.jquery.com/License
8
+ *
9
+ * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
10
+ * Revision: 6246
11
+ */
12
+ (function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
13
+ /*
14
+ * Sizzle CSS Selector Engine - v0.9.3
15
+ * Copyright 2009, The Dojo Foundation
16
+ * Released under the MIT, BSD, and GPL Licenses.
17
+ * More information: http://sizzlejs.com/
18
+ */
19
+ (function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML=' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
includes/jquery/js/jquery-ui-1.7.1.custom.min.js ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery UI 1.7.1
3
+ *
4
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
6
+ * and GPL (GPL-LICENSE.txt) licenses.
7
+ *
8
+ * http://docs.jquery.com/UI
9
+ */
10
+ * jQuery UI Draggable 1.7.1
11
+ *
12
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
13
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
14
+ * and GPL (GPL-LICENSE.txt) licenses.
15
+ *
16
+ * http://docs.jquery.com/UI/Draggables
17
+ *
18
+ * Depends:
19
+ * ui.core.js
20
+ */
21
+ * jQuery UI Droppable 1.7.1
22
+ *
23
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
24
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
25
+ * and GPL (GPL-LICENSE.txt) licenses.
26
+ *
27
+ * http://docs.jquery.com/UI/Droppables
28
+ *
29
+ * Depends:
30
+ * ui.core.js
31
+ * ui.draggable.js
32
+ */
33
+ * jQuery UI Resizable 1.7.1
34
+ *
35
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
36
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
37
+ * and GPL (GPL-LICENSE.txt) licenses.
38
+ *
39
+ * http://docs.jquery.com/UI/Resizables
40
+ *
41
+ * Depends:
42
+ * ui.core.js
43
+ */
44
+ * jQuery UI Selectable 1.7.1
45
+ *
46
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
47
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
48
+ * and GPL (GPL-LICENSE.txt) licenses.
49
+ *
50
+ * http://docs.jquery.com/UI/Selectables
51
+ *
52
+ * Depends:
53
+ * ui.core.js
54
+ */
55
+ * jQuery UI Sortable 1.7.1
56
+ *
57
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
58
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
59
+ * and GPL (GPL-LICENSE.txt) licenses.
60
+ *
61
+ * http://docs.jquery.com/UI/Sortables
62
+ *
63
+ * Depends:
64
+ * ui.core.js
65
+ */
66
+ * jQuery UI Accordion 1.7.1
67
+ *
68
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
69
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
70
+ * and GPL (GPL-LICENSE.txt) licenses.
71
+ *
72
+ * http://docs.jquery.com/UI/Accordion
73
+ *
74
+ * Depends:
75
+ * ui.core.js
76
+ */
77
+ * jQuery UI Dialog 1.7.1
78
+ *
79
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
80
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
81
+ * and GPL (GPL-LICENSE.txt) licenses.
82
+ *
83
+ * http://docs.jquery.com/UI/Dialog
84
+ *
85
+ * Depends:
86
+ * ui.core.js
87
+ * ui.draggable.js
88
+ * ui.resizable.js
89
+ */
90
+ * jQuery UI Slider 1.7.1
91
+ *
92
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
93
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
94
+ * and GPL (GPL-LICENSE.txt) licenses.
95
+ *
96
+ * http://docs.jquery.com/UI/Slider
97
+ *
98
+ * Depends:
99
+ * ui.core.js
100
+ */
101
+ * jQuery UI Tabs 1.7.1
102
+ *
103
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
104
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
105
+ * and GPL (GPL-LICENSE.txt) licenses.
106
+ *
107
+ * http://docs.jquery.com/UI/Tabs
108
+ *
109
+ * Depends:
110
+ * ui.core.js
111
+ */
112
+ * jQuery UI Datepicker 1.7.1
113
+ *
114
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
115
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
116
+ * and GPL (GPL-LICENSE.txt) licenses.
117
+ *
118
+ * http://docs.jquery.com/UI/Datepicker
119
+ *
120
+ * Depends:
121
+ * ui.core.js
122
+ */
123
+ * jQuery UI Progressbar 1.7.1
124
+ *
125
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
126
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
127
+ * and GPL (GPL-LICENSE.txt) licenses.
128
+ *
129
+ * http://docs.jquery.com/UI/Progressbar
130
+ *
131
+ * Depends:
132
+ * ui.core.js
133
+ */
134
+ * jQuery UI Effects 1.7.1
135
+ *
136
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
137
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
138
+ * and GPL (GPL-LICENSE.txt) licenses.
139
+ *
140
+ * http://docs.jquery.com/UI/Effects/
141
+ */
142
+ * jQuery UI Effects Blind 1.7.1
143
+ *
144
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
145
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
146
+ * and GPL (GPL-LICENSE.txt) licenses.
147
+ *
148
+ * http://docs.jquery.com/UI/Effects/Blind
149
+ *
150
+ * Depends:
151
+ * effects.core.js
152
+ */
153
+ * jQuery UI Effects Bounce 1.7.1
154
+ *
155
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
156
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
157
+ * and GPL (GPL-LICENSE.txt) licenses.
158
+ *
159
+ * http://docs.jquery.com/UI/Effects/Bounce
160
+ *
161
+ * Depends:
162
+ * effects.core.js
163
+ */
164
+ * jQuery UI Effects Clip 1.7.1
165
+ *
166
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
167
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
168
+ * and GPL (GPL-LICENSE.txt) licenses.
169
+ *
170
+ * http://docs.jquery.com/UI/Effects/Clip
171
+ *
172
+ * Depends:
173
+ * effects.core.js
174
+ */
175
+ * jQuery UI Effects Drop 1.7.1
176
+ *
177
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
178
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
179
+ * and GPL (GPL-LICENSE.txt) licenses.
180
+ *
181
+ * http://docs.jquery.com/UI/Effects/Drop
182
+ *
183
+ * Depends:
184
+ * effects.core.js
185
+ */
186
+ * jQuery UI Effects Explode 1.7.1
187
+ *
188
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
189
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
190
+ * and GPL (GPL-LICENSE.txt) licenses.
191
+ *
192
+ * http://docs.jquery.com/UI/Effects/Explode
193
+ *
194
+ * Depends:
195
+ * effects.core.js
196
+ */
197
+ * jQuery UI Effects Fold 1.7.1
198
+ *
199
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
200
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
201
+ * and GPL (GPL-LICENSE.txt) licenses.
202
+ *
203
+ * http://docs.jquery.com/UI/Effects/Fold
204
+ *
205
+ * Depends:
206
+ * effects.core.js
207
+ */
208
+ * jQuery UI Effects Highlight 1.7.1
209
+ *
210
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
211
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
212
+ * and GPL (GPL-LICENSE.txt) licenses.
213
+ *
214
+ * http://docs.jquery.com/UI/Effects/Highlight
215
+ *
216
+ * Depends:
217
+ * effects.core.js
218
+ */
219
+ * jQuery UI Effects Pulsate 1.7.1
220
+ *
221
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
222
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
223
+ * and GPL (GPL-LICENSE.txt) licenses.
224
+ *
225
+ * http://docs.jquery.com/UI/Effects/Pulsate
226
+ *
227
+ * Depends:
228
+ * effects.core.js
229
+ */
230
+ * jQuery UI Effects Scale 1.7.1
231
+ *
232
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
233
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
234
+ * and GPL (GPL-LICENSE.txt) licenses.
235
+ *
236
+ * http://docs.jquery.com/UI/Effects/Scale
237
+ *
238
+ * Depends:
239
+ * effects.core.js
240
+ */
241
+ * jQuery UI Effects Shake 1.7.1
242
+ *
243
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
244
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
245
+ * and GPL (GPL-LICENSE.txt) licenses.
246
+ *
247
+ * http://docs.jquery.com/UI/Effects/Shake
248
+ *
249
+ * Depends:
250
+ * effects.core.js
251
+ */
252
+ * jQuery UI Effects Slide 1.7.1
253
+ *
254
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
255
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
256
+ * and GPL (GPL-LICENSE.txt) licenses.
257
+ *
258
+ * http://docs.jquery.com/UI/Effects/Slide
259
+ *
260
+ * Depends:
261
+ * effects.core.js
262
+ */
263
+ * jQuery UI Effects Transfer 1.7.1
264
+ *
265
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
266
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
267
+ * and GPL (GPL-LICENSE.txt) licenses.
268
+ *
269
+ * http://docs.jquery.com/UI/Effects/Transfer
270
+ *
271
+ * Depends:
272
+ * effects.core.js
273
+ */
includes/version-2-ichor/README.txt ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ Hello.
2
+
3
+ This is the Open Flash Chart source code.
4
+
5
+ Take a look around :-)
6
+
7
+ The test data is in the 'data-files' directory.
8
+
includes/version-2-ichor/js/README.txt ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ***************
2
+ ** JS Folder **
3
+ ***************
4
+
5
+ Here are some Javascript libraries used on the code or samples.
6
+
7
+ - swfobject.js
8
+
9
+ SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
10
+ *
11
+ * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
12
+ * http://www.opensource.org/licenses/mit-license.php
includes/version-2-ichor/js/json/json2.js ADDED
@@ -0,0 +1,461 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ http://www.JSON.org/json2.js
3
+ 2008-03-24
4
+
5
+ Public Domain.
6
+
7
+ NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
8
+
9
+ See http://www.JSON.org/js.html
10
+
11
+ This file creates a global JSON object containing three methods: stringify,
12
+ parse, and quote.
13
+
14
+
15
+ JSON.stringify(value, replacer, space)
16
+ value any JavaScript value, usually an object or array.
17
+
18
+ replacer an optional parameter that determines how object
19
+ values are stringified for objects without a toJSON
20
+ method. It can be a function or an array.
21
+
22
+ space an optional parameter that specifies the indentation
23
+ of nested structures. If it is omitted, the text will
24
+ be packed without extra whitespace. If it is a number,
25
+ it will specify the number of spaces to indent at each
26
+ level. If it is a string (such as '\t'), it contains the
27
+ characters used to indent at each level.
28
+
29
+ This method produces a JSON text from a JavaScript value.
30
+
31
+ When an object value is found, if the object contains a toJSON
32
+ method, its toJSON method will be called and the result will be
33
+ stringified. A toJSON method does not serialize: it returns the
34
+ value represented by the name/value pair that should be serialized,
35
+ or undefined if nothing should be serialized. The toJSON method will
36
+ be passed the key associated with the value, and this will be bound
37
+ to the object holding the key.
38
+
39
+ This is the toJSON method added to Dates:
40
+
41
+ function toJSON(key) {
42
+ return this.getUTCFullYear() + '-' +
43
+ f(this.getUTCMonth() + 1) + '-' +
44
+ f(this.getUTCDate()) + 'T' +
45
+ f(this.getUTCHours()) + ':' +
46
+ f(this.getUTCMinutes()) + ':' +
47
+ f(this.getUTCSeconds()) + 'Z';
48
+ }
49
+
50
+ You can provide an optional replacer method. It will be passed the
51
+ key and value of each member, with this bound to the containing
52
+ object. The value that is returned from your method will be
53
+ serialized. If your method returns undefined, then the member will
54
+ be excluded from the serialization.
55
+
56
+ If no replacer parameter is provided, then a default replacer
57
+ will be used:
58
+
59
+ function replacer(key, value) {
60
+ return Object.hasOwnProperty.call(this, key) ?
61
+ value : undefined;
62
+ }
63
+
64
+ The default replacer is passed the key and value for each item in
65
+ the structure. It excludes inherited members.
66
+
67
+ If the replacer parameter is an array, then it will be used to
68
+ select the members to be serialized. It filters the results such
69
+ that only members with keys listed in the replacer array are
70
+ stringified.
71
+
72
+ Values that do not have JSON representaions, such as undefined or
73
+ functions, will not be serialized. Such values in objects will be
74
+ dropped; in arrays they will be replaced with null. You can use
75
+ a replacer function to replace those with JSON values.
76
+ JSON.stringify(undefined) returns undefined.
77
+
78
+ The optional space parameter produces a stringification of the value
79
+ that is filled with line breaks and indentation to make it easier to
80
+ read.
81
+
82
+ If the space parameter is a non-empty string, then that string will
83
+ be used for indentation. If the space parameter is a number, then
84
+ then indentation will be that many spaces.
85
+
86
+ Example:
87
+
88
+ text = JSON.stringify(['e', {pluribus: 'unum'}]);
89
+ // text is '["e",{"pluribus":"unum"}]'
90
+
91
+
92
+ text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
93
+ // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
94
+
95
+
96
+ JSON.parse(text, reviver)
97
+ This method parses a JSON text to produce an object or array.
98
+ It can throw a SyntaxError exception.
99
+
100
+ The optional reviver parameter is a function that can filter and
101
+ transform the results. It receives each of the keys and values,
102
+ and its return value is used instead of the original value.
103
+ If it returns what it received, then the structure is not modified.
104
+ If it returns undefined then the member is deleted.
105
+
106
+ Example:
107
+
108
+ // Parse the text. Values that look like ISO date strings will
109
+ // be converted to Date objects.
110
+
111
+ myData = JSON.parse(text, function (key, value) {
112
+ var a;
113
+ if (typeof value === 'string') {
114
+ a =
115
+ /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
116
+ if (a) {
117
+ return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
118
+ +a[5], +a[6]));
119
+ }
120
+ }
121
+ return value;
122
+ });
123
+
124
+
125
+ JSON.quote(text)
126
+ This method wraps a string in quotes, escaping some characters
127
+ as needed.
128
+
129
+
130
+ This is a reference implementation. You are free to copy, modify, or
131
+ redistribute.
132
+
133
+ USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD THIRD PARTY
134
+ CODE INTO YOUR PAGES.
135
+ */
136
+
137
+ /*jslint regexp: true, forin: true, evil: true */
138
+
139
+ /*global JSON */
140
+
141
+ /*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
142
+ call, charCodeAt, floor, getUTCDate, getUTCFullYear, getUTCHours,
143
+ getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, length,
144
+ parse, propertyIsEnumerable, prototype, push, quote, replace, stringify,
145
+ test, toJSON, toString
146
+ */
147
+
148
+ if (!this.JSON) {
149
+
150
+ // Create a JSON object only if one does not already exist. We create the
151
+ // object in a closure to avoid global variables.
152
+
153
+ JSON = function () {
154
+
155
+ function f(n) { // Format integers to have at least two digits.
156
+ return n < 10 ? '0' + n : n;
157
+ }
158
+
159
+ Date.prototype.toJSON = function () {
160
+
161
+ // Eventually, this method will be based on the date.toISOString method.
162
+
163
+ return this.getUTCFullYear() + '-' +
164
+ f(this.getUTCMonth() + 1) + '-' +
165
+ f(this.getUTCDate()) + 'T' +
166
+ f(this.getUTCHours()) + ':' +
167
+ f(this.getUTCMinutes()) + ':' +
168
+ f(this.getUTCSeconds()) + 'Z';
169
+ };
170
+
171
+
172
+ var escapeable = /["\\\x00-\x1f\x7f-\x9f]/g,
173
+ gap,
174
+ indent,
175
+ meta = { // table of character substitutions
176
+ '\b': '\\b',
177
+ '\t': '\\t',
178
+ '\n': '\\n',
179
+ '\f': '\\f',
180
+ '\r': '\\r',
181
+ '"' : '\\"',
182
+ '\\': '\\\\'
183
+ },
184
+ rep;
185
+
186
+
187
+ function quote(string) {
188
+
189
+ // If the string contains no control characters, no quote characters, and no
190
+ // backslash characters, then we can safely slap some quotes around it.
191
+ // Otherwise we must also replace the offending characters with safe escape
192
+ // sequences.
193
+
194
+ return escapeable.test(string) ?
195
+ '"' + string.replace(escapeable, function (a) {
196
+ var c = meta[a];
197
+ if (typeof c === 'string') {
198
+ return c;
199
+ }
200
+ c = a.charCodeAt();
201
+ return '\\u00' + Math.floor(c / 16).toString(16) +
202
+ (c % 16).toString(16);
203
+ }) + '"' :
204
+ '"' + string + '"';
205
+ }
206
+
207
+
208
+ function str(key, holder) {
209
+
210
+ // Produce a string from holder[key].
211
+
212
+ var i, // The loop counter.
213
+ k, // The member key.
214
+ v, // The member value.
215
+ length,
216
+ mind = gap,
217
+ partial,
218
+ value = holder[key];
219
+
220
+ // If the value has a toJSON method, call it to obtain a replacement value.
221
+
222
+ if (value && typeof value === 'object' &&
223
+ typeof value.toJSON === 'function') {
224
+ value = value.toJSON(key);
225
+ }
226
+
227
+ // If we were called with a replacer function, then call the replacer to
228
+ // obtain a replacement value.
229
+
230
+ if (typeof rep === 'function') {
231
+ value = rep.call(holder, key, value);
232
+ }
233
+
234
+ // What happens next depends on the value's type.
235
+
236
+ switch (typeof value) {
237
+ case 'string':
238
+ return quote(value);
239
+
240
+ case 'number':
241
+
242
+ // JSON numbers must be finite. Encode non-finite numbers as null.
243
+
244
+ return isFinite(value) ? String(value) : 'null';
245
+
246
+ case 'boolean':
247
+ case 'null':
248
+
249
+ // If the value is a boolean or null, convert it to a string. Note:
250
+ // typeof null does not produce 'null'. The case is included here in
251
+ // the remote chance that this gets fixed someday.
252
+
253
+ return String(value);
254
+
255
+ // If the type is 'object', we might be dealing with an object or an array or
256
+ // null.
257
+
258
+ case 'object':
259
+
260
+ // Due to a specification blunder in ECMAScript, typeof null is 'object',
261
+ // so watch out for that case.
262
+
263
+ if (!value) {
264
+ return 'null';
265
+ }
266
+
267
+ // Make an array to hold the partial results of stringifying this object value.
268
+
269
+ gap += indent;
270
+ partial = [];
271
+
272
+ // If the object has a dontEnum length property, we'll treat it as an array.
273
+
274
+ if (typeof value.length === 'number' &&
275
+ !(value.propertyIsEnumerable('length'))) {
276
+
277
+ // The object is an array. Stringify every element. Use null as a placeholder
278
+ // for non-JSON values.
279
+
280
+ length = value.length;
281
+ for (i = 0; i < length; i += 1) {
282
+ partial[i] = str(i, value) || 'null';
283
+ }
284
+
285
+ // Join all of the elements together, separated with commas, and wrap them in
286
+ // brackets.
287
+
288
+ v = partial.length === 0 ? '[]' :
289
+ gap ? '[\n' + gap + partial.join(',\n' + gap) +
290
+ '\n' + mind + ']' :
291
+ '[' + partial.join(',') + ']';
292
+ gap = mind;
293
+ return v;
294
+ }
295
+
296
+ // If the replacer is an array, use it to select the members to be stringified.
297
+
298
+ if (typeof rep === 'object') {
299
+ length = rep.length;
300
+ for (i = 0; i < length; i += 1) {
301
+ k = rep[i];
302
+ if (typeof k === 'string') {
303
+ v = str(k, value, rep);
304
+ if (v) {
305
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
306
+ }
307
+ }
308
+ }
309
+ } else {
310
+
311
+ // Otherwise, iterate through all of the keys in the object.
312
+
313
+ for (k in value) {
314
+ v = str(k, value, rep);
315
+ if (v) {
316
+ partial.push(quote(k) + (gap ? ': ' : ':') + v);
317
+ }
318
+ }
319
+ }
320
+
321
+ // Join all of the member texts together, separated with commas,
322
+ // and wrap them in braces.
323
+
324
+ v = partial.length === 0 ? '{}' :
325
+ gap ? '{\n' + gap + partial.join(',\n' + gap) +
326
+ '\n' + mind + '}' :
327
+ '{' + partial.join(',') + '}';
328
+ gap = mind;
329
+ return v;
330
+ }
331
+ }
332
+
333
+
334
+ // Return the JSON object containing the stringify, parse, and quote methods.
335
+
336
+ return {
337
+ stringify: function (value, replacer, space) {
338
+
339
+ // The stringify method takes a value and an optional replacer, and an optional
340
+ // space parameter, and returns a JSON text. The replacer can be a function
341
+ // that can replace values, or an array of strings that will select the keys.
342
+ // A default replacer method can be provided. Use of the space parameter can
343
+ // produce text that is more easily readable.
344
+
345
+ var i;
346
+ gap = '';
347
+ indent = '';
348
+ if (space) {
349
+
350
+ // If the space parameter is a number, make an indent string containing that
351
+ // many spaces.
352
+
353
+ if (typeof space === 'number') {
354
+ for (i = 0; i < space; i += 1) {
355
+ indent += ' ';
356
+ }
357
+
358
+ // If the space parameter is a string, it will be used as the indent string.
359
+
360
+ } else if (typeof space === 'string') {
361
+ indent = space;
362
+ }
363
+ }
364
+
365
+ // If there is no replacer parameter, use the default replacer.
366
+
367
+ if (!replacer) {
368
+ rep = function (key, value) {
369
+ if (!Object.hasOwnProperty.call(this, key)) {
370
+ return undefined;
371
+ }
372
+ return value;
373
+ };
374
+
375
+ // The replacer can be a function or an array. Otherwise, throw an error.
376
+
377
+ } else if (typeof replacer === 'function' ||
378
+ (typeof replacer === 'object' &&
379
+ typeof replacer.length === 'number')) {
380
+ rep = replacer;
381
+ } else {
382
+ throw new Error('JSON.stringify');
383
+ }
384
+
385
+ // Make a fake root object containing our value under the key of ''.
386
+ // Return the result of stringifying the value.
387
+
388
+ return str('', {'': value});
389
+ },
390
+
391
+
392
+ parse: function (text, reviver) {
393
+
394
+ // The parse method takes a text and an optional reviver function, and returns
395
+ // a JavaScript value if the text is a valid JSON text.
396
+
397
+ var j;
398
+
399
+ function walk(holder, key) {
400
+
401
+ // The walk method is used to recursively walk the resulting structure so
402
+ // that modifications can be made.
403
+
404
+ var k, v, value = holder[key];
405
+ if (value && typeof value === 'object') {
406
+ for (k in value) {
407
+ if (Object.hasOwnProperty.call(value, k)) {
408
+ v = walk(value, k);
409
+ if (v !== undefined) {
410
+ value[k] = v;
411
+ } else {
412
+ delete value[k];
413
+ }
414
+ }
415
+ }
416
+ }
417
+ return reviver.call(holder, key, value);
418
+ }
419
+
420
+
421
+ // Parsing happens in three stages. In the first stage, we run the text against
422
+ // regular expressions that look for non-JSON patterns. We are especially
423
+ // concerned with '()' and 'new' because they can cause invocation, and '='
424
+ // because it can cause mutation. But just to be safe, we want to reject all
425
+ // unexpected forms.
426
+
427
+ // We split the first stage into 4 regexp operations in order to work around
428
+ // crippling inefficiencies in IE's and Safari's regexp engines. First we
429
+ // replace all backslash pairs with '@' (a non-JSON character). Second, we
430
+ // replace all simple value tokens with ']' characters. Third, we delete all
431
+ // open brackets that follow a colon or comma or that begin the text. Finally,
432
+ // we look to see that the remaining characters are only whitespace or ']' or
433
+ // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
434
+
435
+ if (/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/bfnrtu]/g, '@').
436
+ replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
437
+ replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
438
+
439
+ // In the second stage we use the eval function to compile the text into a
440
+ // JavaScript structure. The '{' operator is subject to a syntactic ambiguity
441
+ // in JavaScript: it can begin a block or an object literal. We wrap the text
442
+ // in parens to eliminate the ambiguity.
443
+
444
+ j = eval('(' + text + ')');
445
+
446
+ // In the optional third stage, we recursively walk the new structure, passing
447
+ // each name/value pair to a reviver function for possible transformation.
448
+
449
+ return typeof reviver === 'function' ?
450
+ walk({'': j}, '') : j;
451
+ }
452
+
453
+ // If the text is not JSON parseable, then a SyntaxError is thrown.
454
+
455
+ throw new SyntaxError('JSON.parse');
456
+ },
457
+
458
+ quote: quote
459
+ };
460
+ }();
461
+ }
includes/version-2-ichor/js/swfobject.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ /* SWFObject v2.1 <http://code.google.com/p/swfobject/>
2
+ Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
3
+ This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
4
+ */
5
+ var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();
includes/version-2-ichor/open-flash-chart.swf ADDED
Binary file
includes/version-2-ichor/php-ofc-library/JSON.php ADDED
@@ -0,0 +1,806 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
3
+
4
+ /**
5
+ * Converts to and from JSON format.
6
+ *
7
+ * JSON (JavaScript Object Notation) is a lightweight data-interchange
8
+ * format. It is easy for humans to read and write. It is easy for machines
9
+ * to parse and generate. It is based on a subset of the JavaScript
10
+ * Programming Language, Standard ECMA-262 3rd Edition - December 1999.
11
+ * This feature can also be found in Python. JSON is a text format that is
12
+ * completely language independent but uses conventions that are familiar
13
+ * to programmers of the C-family of languages, including C, C++, C#, Java,
14
+ * JavaScript, Perl, TCL, and many others. These properties make JSON an
15
+ * ideal data-interchange language.
16
+ *
17
+ * This package provides a simple encoder and decoder for JSON notation. It
18
+ * is intended for use with client-side Javascript applications that make
19
+ * use of HTTPRequest to perform server communication functions - data can
20
+ * be encoded into JSON notation for use in a client-side javascript, or
21
+ * decoded from incoming Javascript requests. JSON format is native to
22
+ * Javascript, and can be directly eval()'ed with no further parsing
23
+ * overhead
24
+ *
25
+ * All strings should be in ASCII or UTF-8 format!
26
+ *
27
+ * LICENSE: Redistribution and use in source and binary forms, with or
28
+ * without modification, are permitted provided that the following
29
+ * conditions are met: Redistributions of source code must retain the
30
+ * above copyright notice, this list of conditions and the following
31
+ * disclaimer. Redistributions in binary form must reproduce the above
32
+ * copyright notice, this list of conditions and the following disclaimer
33
+ * in the documentation and/or other materials provided with the
34
+ * distribution.
35
+ *
36
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
37
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
38
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
39
+ * NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
40
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
41
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
42
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
43
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
44
+ * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
45
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
46
+ * DAMAGE.
47
+ *
48
+ * @category
49
+ * @package Services_JSON
50
+ * @author Michal Migurski <mike-json@teczno.com>
51
+ * @author Matt Knapp <mdknapp[at]gmail[dot]com>
52
+ * @author Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
53
+ * @copyright 2005 Michal Migurski
54
+ * @version CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $
55
+ * @license http://www.opensource.org/licenses/bsd-license.php
56
+ * @link http://pear.php.net/pepr/pepr-proposal-show.php?id=198
57
+ */
58
+
59
+ /**
60
+ * Marker constant for Services_JSON::decode(), used to flag stack state
61
+ */
62
+ define('SERVICES_JSON_SLICE', 1);
63
+
64
+ /**
65
+ * Marker constant for Services_JSON::decode(), used to flag stack state
66
+ */
67
+ define('SERVICES_JSON_IN_STR', 2);
68
+
69
+ /**
70
+ * Marker constant for Services_JSON::decode(), used to flag stack state
71
+ */
72
+ define('SERVICES_JSON_IN_ARR', 3);
73
+
74
+ /**
75
+ * Marker constant for Services_JSON::decode(), used to flag stack state
76
+ */
77
+ define('SERVICES_JSON_IN_OBJ', 4);
78
+
79
+ /**
80
+ * Marker constant for Services_JSON::decode(), used to flag stack state
81
+ */
82
+ define('SERVICES_JSON_IN_CMT', 5);
83
+
84
+ /**
85
+ * Behavior switch for Services_JSON::decode()
86
+ */
87
+ define('SERVICES_JSON_LOOSE_TYPE', 16);
88
+
89
+ /**
90
+ * Behavior switch for Services_JSON::decode()
91
+ */
92
+ define('SERVICES_JSON_SUPPRESS_ERRORS', 32);
93
+
94
+ /**
95
+ * Converts to and from JSON format.
96
+ *
97
+ * Brief example of use:
98
+ *
99
+ * <code>
100
+ * // create a new instance of Services_JSON
101
+ * $json = new Services_JSON();
102
+ *
103
+ * // convert a complexe value to JSON notation, and send it to the browser
104
+ * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
105
+ * $output = $json->encode($value);
106
+ *
107
+ * print($output);
108
+ * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
109
+ *
110
+ * // accept incoming POST data, assumed to be in JSON notation
111
+ * $input = file_get_contents('php://input', 1000000);
112
+ * $value = $json->decode($input);
113
+ * </code>
114
+ */
115
+ class Services_JSON
116
+ {
117
+ /**
118
+ * constructs a new JSON instance
119
+ *
120
+ * @param int $use object behavior flags; combine with boolean-OR
121
+ *
122
+ * possible values:
123
+ * - SERVICES_JSON_LOOSE_TYPE: loose typing.
124
+ * "{...}" syntax creates associative arrays
125
+ * instead of objects in decode().
126
+ * - SERVICES_JSON_SUPPRESS_ERRORS: error suppression.
127
+ * Values which can't be encoded (e.g. resources)
128
+ * appear as NULL instead of throwing errors.
129
+ * By default, a deeply-nested resource will
130
+ * bubble up with an error, so all return values
131
+ * from encode() should be checked with isError()
132
+ */
133
+ function Services_JSON($use = 0)
134
+ {
135
+ $this->use = $use;
136
+ }
137
+
138
+ /**
139
+ * convert a string from one UTF-16 char to one UTF-8 char
140
+ *
141
+ * Normally should be handled by mb_convert_encoding, but
142
+ * provides a slower PHP-only method for installations
143
+ * that lack the multibye string extension.
144
+ *
145
+ * @param string $utf16 UTF-16 character
146
+ * @return string UTF-8 character
147
+ * @access private
148
+ */
149
+ function utf162utf8($utf16)
150
+ {
151
+ // oh please oh please oh please oh please oh please
152
+ if(function_exists('mb_convert_encoding')) {
153
+ return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');
154
+ }
155
+
156
+ $bytes = (ord($utf16{0}) << 8) | ord($utf16{1});
157
+
158
+ switch(true) {
159
+ case ((0x7F & $bytes) == $bytes):
160
+ // this case should never be reached, because we are in ASCII range
161
+ // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
162
+ return chr(0x7F & $bytes);
163
+
164
+ case (0x07FF & $bytes) == $bytes:
165
+ // return a 2-byte UTF-8 character
166
+ // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
167
+ return chr(0xC0 | (($bytes >> 6) & 0x1F))
168
+ . chr(0x80 | ($bytes & 0x3F));
169
+
170
+ case (0xFFFF & $bytes) == $bytes:
171
+ // return a 3-byte UTF-8 character
172
+ // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
173
+ return chr(0xE0 | (($bytes >> 12) & 0x0F))
174
+ . chr(0x80 | (($bytes >> 6) & 0x3F))
175
+ . chr(0x80 | ($bytes & 0x3F));
176
+ }
177
+
178
+ // ignoring UTF-32 for now, sorry
179
+ return '';
180
+ }
181
+
182
+ /**
183
+ * convert a string from one UTF-8 char to one UTF-16 char
184
+ *
185
+ * Normally should be handled by mb_convert_encoding, but
186
+ * provides a slower PHP-only method for installations
187
+ * that lack the multibye string extension.
188
+ *
189
+ * @param string $utf8 UTF-8 character
190
+ * @return string UTF-16 character
191
+ * @access private
192
+ */
193
+ function utf82utf16($utf8)
194
+ {
195
+ // oh please oh please oh please oh please oh please
196
+ if(function_exists('mb_convert_encoding')) {
197
+ return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');
198
+ }
199
+
200
+ switch(strlen($utf8)) {
201
+ case 1:
202
+ // this case should never be reached, because we are in ASCII range
203
+ // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
204
+ return $utf8;
205
+
206
+ case 2:
207
+ // return a UTF-16 character from a 2-byte UTF-8 char
208
+ // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
209
+ return chr(0x07 & (ord($utf8{0}) >> 2))
210
+ . chr((0xC0 & (ord($utf8{0}) << 6))
211
+ | (0x3F & ord($utf8{1})));
212
+
213
+ case 3:
214
+ // return a UTF-16 character from a 3-byte UTF-8 char
215
+ // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
216
+ return chr((0xF0 & (ord($utf8{0}) << 4))
217
+ | (0x0F & (ord($utf8{1}) >> 2)))
218
+ . chr((0xC0 & (ord($utf8{1}) << 6))
219
+ | (0x7F & ord($utf8{2})));
220
+ }
221
+
222
+ // ignoring UTF-32 for now, sorry
223
+ return '';
224
+ }
225
+
226
+ /**
227
+ * encodes an arbitrary variable into JSON format
228
+ *
229
+ * @param mixed $var any number, boolean, string, array, or object to be encoded.
230
+ * see argument 1 to Services_JSON() above for array-parsing behavior.
231
+ * if var is a strng, note that encode() always expects it
232
+ * to be in ASCII or UTF-8 format!
233
+ *
234
+ * @return mixed JSON string representation of input var or an error if a problem occurs
235
+ * @access public
236
+ */
237
+ function encode($var)
238
+ {
239
+ switch (gettype($var)) {
240
+ case 'boolean':
241
+ return $var ? 'true' : 'false';
242
+
243
+ case 'NULL':
244
+ return 'null';
245
+
246
+ case 'integer':
247
+ return (int) $var;
248
+
249
+ case 'double':
250
+ case 'float':
251
+ return (float) $var;
252
+
253
+ case 'string':
254
+ // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT
255
+ $ascii = '';
256
+ $strlen_var = strlen($var);
257
+
258
+ /*
259
+ * Iterate over every character in the string,
260
+ * escaping with a slash or encoding to UTF-8 where necessary
261
+ */
262
+ for ($c = 0; $c < $strlen_var; ++$c) {
263
+
264
+ $ord_var_c = ord($var{$c});
265
+
266
+ switch (true) {
267
+ case $ord_var_c == 0x08:
268
+ $ascii .= '\b';
269
+ break;
270
+ case $ord_var_c == 0x09:
271
+ $ascii .= '\t';
272
+ break;
273
+ case $ord_var_c == 0x0A:
274
+ $ascii .= '\n';
275
+ break;
276
+ case $ord_var_c == 0x0C:
277
+ $ascii .= '\f';
278
+ break;
279
+ case $ord_var_c == 0x0D:
280
+ $ascii .= '\r';
281
+ break;
282
+
283
+ case $ord_var_c == 0x22:
284
+ case $ord_var_c == 0x2F:
285
+ case $ord_var_c == 0x5C:
286
+ // double quote, slash, slosh
287
+ $ascii .= '\\'.$var{$c};
288
+ break;
289
+
290
+ case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
291
+ // characters U-00000000 - U-0000007F (same as ASCII)
292
+ $ascii .= $var{$c};
293
+ break;
294
+
295
+ case (($ord_var_c & 0xE0) == 0xC0):
296
+ // characters U-00000080 - U-000007FF, mask 110XXXXX
297
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
298
+ $char = pack('C*', $ord_var_c, ord($var{$c + 1}));
299
+ $c += 1;
300
+ $utf16 = $this->utf82utf16($char);
301
+ $ascii .= sprintf('\u%04s', bin2hex($utf16));
302
+ break;
303
+
304
+ case (($ord_var_c & 0xF0) == 0xE0):
305
+ // characters U-00000800 - U-0000FFFF, mask 1110XXXX
306
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
307
+ $char = pack('C*', $ord_var_c,
308
+ ord($var{$c + 1}),
309
+ ord($var{$c + 2}));
310
+ $c += 2;
311
+ $utf16 = $this->utf82utf16($char);
312
+ $ascii .= sprintf('\u%04s', bin2hex($utf16));
313
+ break;
314
+
315
+ case (($ord_var_c & 0xF8) == 0xF0):
316
+ // characters U-00010000 - U-001FFFFF, mask 11110XXX
317
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
318
+ $char = pack('C*', $ord_var_c,
319
+ ord($var{$c + 1}),
320
+ ord($var{$c + 2}),
321
+ ord($var{$c + 3}));
322
+ $c += 3;
323
+ $utf16 = $this->utf82utf16($char);
324
+ $ascii .= sprintf('\u%04s', bin2hex($utf16));
325
+ break;
326
+
327
+ case (($ord_var_c & 0xFC) == 0xF8):
328
+ // characters U-00200000 - U-03FFFFFF, mask 111110XX
329
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
330
+ $char = pack('C*', $ord_var_c,
331
+ ord($var{$c + 1}),
332
+ ord($var{$c + 2}),
333
+ ord($var{$c + 3}),
334
+ ord($var{$c + 4}));
335
+ $c += 4;
336
+ $utf16 = $this->utf82utf16($char);
337
+ $ascii .= sprintf('\u%04s', bin2hex($utf16));
338
+ break;
339
+
340
+ case (($ord_var_c & 0xFE) == 0xFC):
341
+ // characters U-04000000 - U-7FFFFFFF, mask 1111110X
342
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
343
+ $char = pack('C*', $ord_var_c,
344
+ ord($var{$c + 1}),
345
+ ord($var{$c + 2}),
346
+ ord($var{$c + 3}),
347
+ ord($var{$c + 4}),
348
+ ord($var{$c + 5}));
349
+ $c += 5;
350
+ $utf16 = $this->utf82utf16($char);
351
+ $ascii .= sprintf('\u%04s', bin2hex($utf16));
352
+ break;
353
+ }
354
+ }
355
+
356
+ return '"'.$ascii.'"';
357
+
358
+ case 'array':
359
+ /*
360
+ * As per JSON spec if any array key is not an integer
361
+ * we must treat the the whole array as an object. We
362
+ * also try to catch a sparsely populated associative
363
+ * array with numeric keys here because some JS engines
364
+ * will create an array with empty indexes up to
365
+ * max_index which can cause memory issues and because
366
+ * the keys, which may be relevant, will be remapped
367
+ * otherwise.
368
+ *
369
+ * As per the ECMA and JSON specification an object may
370
+ * have any string as a property. Unfortunately due to
371
+ * a hole in the ECMA specification if the key is a
372
+ * ECMA reserved word or starts with a digit the
373
+ * parameter is only accessible using ECMAScript's
374
+ * bracket notation.
375
+ */
376
+
377
+ // treat as a JSON object
378
+ if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {
379
+ $properties = array_map(array($this, 'name_value'),
380
+ array_keys($var),
381
+ array_values($var));
382
+
383
+ foreach($properties as $property) {
384
+ if(Services_JSON::isError($property)) {
385
+ return $property;
386
+ }
387
+ }
388
+
389
+ return '{' . join(',', $properties) . '}';
390
+ }
391
+
392
+ // treat it like a regular array
393
+ $elements = array_map(array($this, 'encode'), $var);
394
+
395
+ foreach($elements as $element) {
396
+ if(Services_JSON::isError($element)) {
397
+ return $element;
398
+ }
399
+ }
400
+
401
+ return '[' . join(',', $elements) . ']';
402
+
403
+ case 'object':
404
+ $vars = get_object_vars($var);
405
+
406
+ $properties = array_map(array($this, 'name_value'),
407
+ array_keys($vars),
408
+ array_values($vars));
409
+
410
+ foreach($properties as $property) {
411
+ if(Services_JSON::isError($property)) {
412
+ return $property;
413
+ }
414
+ }
415
+
416
+ return '{' . join(',', $properties) . '}';
417
+
418
+ default:
419
+ return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)
420
+ ? 'null'
421
+ : new Services_JSON_Error(gettype($var)." can not be encoded as JSON string");
422
+ }
423
+ }
424
+
425
+ /**
426
+ * array-walking function for use in generating JSON-formatted name-value pairs
427
+ *
428
+ * @param string $name name of key to use
429
+ * @param mixed $value reference to an array element to be encoded
430
+ *
431
+ * @return string JSON-formatted name-value pair, like '"name":value'
432
+ * @access private
433
+ */
434
+ function name_value($name, $value)
435
+ {
436
+ $encoded_value = $this->encode($value);
437
+
438
+ if(Services_JSON::isError($encoded_value)) {
439
+ return $encoded_value;
440
+ }
441
+
442
+ return $this->encode(strval($name)) . ':' . $encoded_value;
443
+ }
444
+
445
+ /**
446
+ * reduce a string by removing leading and trailing comments and whitespace
447
+ *
448
+ * @param $str string string value to strip of comments and whitespace
449
+ *
450
+ * @return string string value stripped of comments and whitespace
451
+ * @access private
452
+ */
453
+ function reduce_string($str)
454
+ {
455
+ $str = preg_replace(array(
456
+
457
+ // eliminate single line comments in '// ...' form
458
+ '#^\s*//(.+)$#m',
459
+
460
+ // eliminate multi-line comments in '/* ... */' form, at start of string
461
+ '#^\s*/\*(.+)\*/#Us',
462
+
463
+ // eliminate multi-line comments in '/* ... */' form, at end of string
464
+ '#/\*(.+)\*/\s*$#Us'
465
+
466
+ ), '', $str);
467
+
468
+ // eliminate extraneous space
469
+ return trim($str);
470
+ }
471
+
472
+ /**
473
+ * decodes a JSON string into appropriate variable
474
+ *
475
+ * @param string $str JSON-formatted string
476
+ *
477
+ * @return mixed number, boolean, string, array, or object
478
+ * corresponding to given JSON input string.
479
+ * See argument 1 to Services_JSON() above for object-output behavior.
480
+ * Note that decode() always returns strings
481
+ * in ASCII or UTF-8 format!
482
+ * @access public
483
+ */
484
+ function decode($str)
485
+ {
486
+ $str = $this->reduce_string($str);
487
+
488
+ switch (strtolower($str)) {
489
+ case 'true':
490
+ return true;
491
+
492
+ case 'false':
493
+ return false;
494
+
495
+ case 'null':
496
+ return null;
497
+
498
+ default:
499
+ $m = array();
500
+
501
+ if (is_numeric($str)) {
502
+ // Lookie-loo, it's a number
503
+
504
+ // This would work on its own, but I'm trying to be
505
+ // good about returning integers where appropriate:
506
+ // return (float)$str;
507
+
508
+ // Return float or int, as appropriate
509
+ return ((float)$str == (integer)$str)
510
+ ? (integer)$str
511
+ : (float)$str;
512
+
513
+ } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) {
514
+ // STRINGS RETURNED IN UTF-8 FORMAT
515
+ $delim = substr($str, 0, 1);
516
+ $chrs = substr($str, 1, -1);
517
+ $utf8 = '';
518
+ $strlen_chrs = strlen($chrs);
519
+
520
+ for ($c = 0; $c < $strlen_chrs; ++$c) {
521
+
522
+ $substr_chrs_c_2 = substr($chrs, $c, 2);
523
+ $ord_chrs_c = ord($chrs{$c});
524
+
525
+ switch (true) {
526
+ case $substr_chrs_c_2 == '\b':
527
+ $utf8 .= chr(0x08);
528
+ ++$c;
529
+ break;
530
+ case $substr_chrs_c_2 == '\t':
531
+ $utf8 .= chr(0x09);
532
+ ++$c;
533
+ break;
534
+ case $substr_chrs_c_2 == '\n':
535
+ $utf8 .= chr(0x0A);
536
+ ++$c;
537
+ break;
538
+ case $substr_chrs_c_2 == '\f':
539
+ $utf8 .= chr(0x0C);
540
+ ++$c;
541
+ break;
542
+ case $substr_chrs_c_2 == '\r':
543
+ $utf8 .= chr(0x0D);
544
+ ++$c;
545
+ break;
546
+
547
+ case $substr_chrs_c_2 == '\\"':
548
+ case $substr_chrs_c_2 == '\\\'':
549
+ case $substr_chrs_c_2 == '\\\\':
550
+ case $substr_chrs_c_2 == '\\/':
551
+ if (($delim == '"' && $substr_chrs_c_2 != '\\\'') ||
552
+ ($delim == "'" && $substr_chrs_c_2 != '\\"')) {
553
+ $utf8 .= $chrs{++$c};
554
+ }
555
+ break;
556
+
557
+ case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)):
558
+ // single, escaped unicode character
559
+ $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2)))
560
+ . chr(hexdec(substr($chrs, ($c + 4), 2)));
561
+ $utf8 .= $this->utf162utf8($utf16);
562
+ $c += 5;
563
+ break;
564
+
565
+ case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):
566
+ $utf8 .= $chrs{$c};
567
+ break;
568
+
569
+ case ($ord_chrs_c & 0xE0) == 0xC0:
570
+ // characters U-00000080 - U-000007FF, mask 110XXXXX
571
+ //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
572
+ $utf8 .= substr($chrs, $c, 2);
573
+ ++$c;
574
+ break;
575
+
576
+ case ($ord_chrs_c & 0xF0) == 0xE0:
577
+ // characters U-00000800 - U-0000FFFF, mask 1110XXXX
578
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
579
+ $utf8 .= substr($chrs, $c, 3);
580
+ $c += 2;
581
+ break;
582
+
583
+ case ($ord_chrs_c & 0xF8) == 0xF0:
584
+ // characters U-00010000 - U-001FFFFF, mask 11110XXX
585
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
586
+ $utf8 .= substr($chrs, $c, 4);
587
+ $c += 3;
588
+ break;
589
+
590
+ case ($ord_chrs_c & 0xFC) == 0xF8:
591
+ // characters U-00200000 - U-03FFFFFF, mask 111110XX
592
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
593
+ $utf8 .= substr($chrs, $c, 5);
594
+ $c += 4;
595
+ break;
596
+
597
+ case ($ord_chrs_c & 0xFE) == 0xFC:
598
+ // characters U-04000000 - U-7FFFFFFF, mask 1111110X
599
+ // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
600
+ $utf8 .= substr($chrs, $c, 6);
601
+ $c += 5;
602
+ break;
603
+
604
+ }
605
+
606
+ }
607
+
608
+ return $utf8;
609
+
610
+ } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {
611
+ // array, or object notation
612
+
613
+ if ($str{0} == '[') {
614
+ $stk = array(SERVICES_JSON_IN_ARR);
615
+ $arr = array();
616
+ } else {
617
+ if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
618
+ $stk = array(SERVICES_JSON_IN_OBJ);
619
+ $obj = array();
620
+ } else {
621
+ $stk = array(SERVICES_JSON_IN_OBJ);
622
+ $obj = new stdClass();
623
+ }
624
+ }
625
+
626
+ array_push($stk, array('what' => SERVICES_JSON_SLICE,
627
+ 'where' => 0,
628
+ 'delim' => false));
629
+
630
+ $chrs = substr($str, 1, -1);
631
+ $chrs = $this->reduce_string($chrs);
632
+
633
+ if ($chrs == '') {
634
+ if (reset($stk) == SERVICES_JSON_IN_ARR) {
635
+ return $arr;
636
+
637
+ } else {
638
+ return $obj;
639
+
640
+ }
641
+ }
642
+
643
+ //print("\nparsing {$chrs}\n");
644
+
645
+ $strlen_chrs = strlen($chrs);
646
+
647
+ for ($c = 0; $c <= $strlen_chrs; ++$c) {
648
+
649
+ $top = end($stk);
650
+ $substr_chrs_c_2 = substr($chrs, $c, 2);
651
+
652
+ if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
653
+ // found a comma that is not inside a string, array, etc.,
654
+ // OR we've reached the end of the character list
655
+ $slice = substr($chrs, $top['where'], ($c - $top['where']));
656
+ array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));
657
+ //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
658
+
659
+ if (reset($stk) == SERVICES_JSON_IN_ARR) {
660
+ // we are in an array, so just push an element onto the stack
661
+ array_push($arr, $this->decode($slice));
662
+
663
+ } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
664
+ // we are in an object, so figure
665
+ // out the property name and set an
666
+ // element in an associative array,
667
+ // for now
668
+ $parts = array();
669
+
670
+ if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
671
+ // "name":value pair
672
+ $key = $this->decode($parts[1]);
673
+ $val = $this->decode($parts[2]);
674
+
675
+ if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
676
+ $obj[$key] = $val;
677
+ } else {
678
+ $obj->$key = $val;
679
+ }
680
+ } elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {
681
+ // name:value pair, where name is unquoted
682
+ $key = $parts[1];
683
+ $val = $this->decode($parts[2]);
684
+
685
+ if ($this->use & SERVICES_JSON_LOOSE_TYPE) {
686
+ $obj[$key] = $val;
687
+ } else {
688
+ $obj->$key = $val;
689
+ }
690
+ }
691
+
692
+ }
693
+
694
+ } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
695
+ // found a quote, and we are not inside a string
696
+ array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));
697
+ //print("Found start of string at {$c}\n");
698
+
699
+ } elseif (($chrs{$c} == $top['delim']) &&
700
+ ($top['what'] == SERVICES_JSON_IN_STR) &&
701
+ ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) {
702
+ // found a quote, we're in a string, and it's not escaped
703
+ // we know that it's not escaped becase there is _not_ an
704
+ // odd number of backslashes at the end of the string so far
705
+ array_pop($stk);
706
+ //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");
707
+
708
+ } elseif (($chrs{$c} == '[') &&
709
+ in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
710
+ // found a left-bracket, and we are in an array, object, or slice
711
+ array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false));
712
+ //print("Found start of array at {$c}\n");
713
+
714
+ } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
715
+ // found a right-bracket, and we're in an array
716
+ array_pop($stk);
717
+ //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
718
+
719
+ } elseif (($chrs{$c} == '{') &&
720
+ in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
721
+ // found a left-brace, and we are in an array, object, or slice
722
+ array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false));
723
+ //print("Found start of object at {$c}\n");
724
+
725
+ } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
726
+ // found a right-brace, and we're in an object
727
+ array_pop($stk);
728
+ //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
729
+
730
+ } elseif (($substr_chrs_c_2 == '/*') &&
731
+ in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {
732
+ // found a comment start, and we are in an array, object, or slice
733
+ array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false));
734
+ $c++;
735
+ //print("Found start of comment at {$c}\n");
736
+
737
+ } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {
738
+ // found a comment end, and we're in one now
739
+ array_pop($stk);
740
+ $c++;
741
+
742
+ for ($i = $top['where']; $i <= $c; ++$i)
743
+ $chrs = substr_replace($chrs, ' ', $i, 1);
744
+
745
+ //print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");
746
+
747
+ }
748
+
749
+ }
750
+
751
+ if (reset($stk) == SERVICES_JSON_IN_ARR) {
752
+ return $arr;
753
+
754
+ } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {
755
+ return $obj;
756
+
757
+ }
758
+
759
+ }
760
+ }
761
+ }
762
+
763
+ /**
764
+ * @todo Ultimately, this should just call PEAR::isError()
765
+ */
766
+ function isError($data, $code = null)
767
+ {
768
+ if (class_exists('pear')) {
769
+ return PEAR::isError($data, $code);
770
+ } elseif (is_object($data) && (get_class($data) == 'services_json_error' ||
771
+ is_subclass_of($data, 'services_json_error'))) {
772
+ return true;
773
+ }
774
+
775
+ return false;
776
+ }
777
+ }
778
+
779
+ if (class_exists('PEAR_Error')) {
780
+
781
+ class Services_JSON_Error extends PEAR_Error
782
+ {
783
+ function Services_JSON_Error($message = 'unknown error', $code = null,
784
+ $mode = null, $options = null, $userinfo = null)
785
+ {
786
+ parent::PEAR_Error($message, $code, $mode, $options, $userinfo);
787
+ }
788
+ }
789
+
790
+ } else {
791
+
792
+ /**
793
+ * @todo Ultimately, this class shall be descended from PEAR_Error
794
+ */
795
+ class Services_JSON_Error
796
+ {
797
+ function Services_JSON_Error($message = 'unknown error', $code = null,
798
+ $mode = null, $options = null, $userinfo = null)
799
+ {
800
+
801
+ }
802
+ }
803
+
804
+ }
805
+
806
+ ?>
includes/version-2-ichor/php-ofc-library/README.txt ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Open Flash Chart - PHP libraries. These help create data files for Open Flash Chart.
2
+ Copyright (C) 2007
3
+
4
+ This library is free software; you can redistribute it and/or
5
+ modify it under the terms of the GNU Lesser General Public
6
+ License as published by the Free Software Foundation; either
7
+ version 2.1 of the License, or (at your option) any later version.
8
+
9
+ This library is distributed in the hope that it will be useful,
10
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
+ Lesser General Public License for more details.
13
+
14
+ You should have received a copy of the GNU Lesser General Public
15
+ License along with this library; if not, write to the Free Software
16
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
includes/version-2-ichor/php-ofc-library/dot_base.php ADDED
@@ -0,0 +1,231 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * A private class. All the other line-dots inherit from this.
5
+ * Gives them all some common methods.
6
+ */
7
+ class dot_base
8
+ {
9
+ /**
10
+ * @param $type string
11
+ * @param $value integer
12
+ */
13
+ function dot_base($type, $value=null)
14
+ {
15
+ $this->type = $type;
16
+ if( isset( $value ) )
17
+ $this->value( $value );
18
+ }
19
+
20
+ /**
21
+ * For line charts that only require a Y position
22
+ * for each point.
23
+ * @param $value as integer, the Y position
24
+ */
25
+ function value( $value )
26
+ {
27
+ $this->value = $value;
28
+ }
29
+
30
+ /**
31
+ * For scatter charts that require an X and Y position for
32
+ * each point.
33
+ *
34
+ * @param $x as integer
35
+ * @param $y as integer
36
+ */
37
+ function position( $x, $y )
38
+ {
39
+ $this->x = $x;
40
+ $this->y = $y;
41
+ }
42
+
43
+ /**
44
+ * @param $colour is a string, HEX colour, e.g. '#FF0000' red
45
+ */
46
+ function colour($colour)
47
+ {
48
+ $this->colour = $colour;
49
+ return $this;
50
+ }
51
+
52
+ /**
53
+ * The tooltip for this dot.
54
+ */
55
+ function tooltip( $tip )
56
+ {
57
+ $this->tip = $tip;
58
+ return $this;
59
+ }
60
+
61
+ /**
62
+ * @param $size is an integer. Size of the dot.
63
+ */
64
+ function size($size)
65
+ {
66
+ $tmp = 'dot-size';
67
+ $this->$tmp = $size;
68
+ return $this;
69
+ }
70
+
71
+ /**
72
+ * a private method
73
+ */
74
+ function type( $type )
75
+ {
76
+ $this->type = $type;
77
+ return $this;
78
+ }
79
+
80
+ /**
81
+ * @param $size is an integer. The size of the hollow 'halo' around the dot that masks the line.
82
+ */
83
+ function halo_size( $size )
84
+ {
85
+ $tmp = 'halo-size';
86
+ $this->$tmp = $size;
87
+ return $this;
88
+ }
89
+
90
+ /**
91
+ * @param $do as string. One of three options (examples):
92
+ * - "http://example.com" - browse to this URL
93
+ * - "https://example.com" - browse to this URL
94
+ * - "trace:message" - print this message in the FlashDevelop debug pane
95
+ * - all other strings will be called as Javascript functions, so a string "hello_world"
96
+ * will call the JS function "hello_world(index)". It passes in the index of the
97
+ * point.
98
+ */
99
+ function on_click( $do )
100
+ {
101
+ $tmp = 'on-click';
102
+ $this->$tmp = $do;
103
+ }
104
+ }
105
+
106
+ /**
107
+ * Draw a hollow dot
108
+ */
109
+ class hollow_dot extends dot_base
110
+ {
111
+ function hollow_dot($value=null)
112
+ {
113
+ parent::dot_base( 'hollow-dot', $value );
114
+ }
115
+ }
116
+
117
+ /**
118
+ * Draw a star
119
+ */
120
+ class star extends dot_base
121
+ {
122
+ /**
123
+ * The constructor, takes an optional $value
124
+ */
125
+ function star($value=null)
126
+ {
127
+ parent::dot_base( 'star', $value );
128
+ }
129
+
130
+ /**
131
+ * @param $angle is an integer.
132
+ */
133
+ function rotation($angle)
134
+ {
135
+ $this->rotation = $angle;
136
+ return $this;
137
+ }
138
+
139
+ /**
140
+ * @param $is_hollow is a boolean.
141
+ */
142
+ function hollow($is_hollow)
143
+ {
144
+ $this->hollow = $is_hollow;
145
+ }
146
+ }
147
+
148
+ /**
149
+ * Draw a 'bow tie' shape.
150
+ */
151
+ class bow extends dot_base
152
+ {
153
+ /**
154
+ * The constructor, takes an optional $value
155
+ */
156
+ function bow($value=null)
157
+ {
158
+ parent::dot_base( 'bow', $value );
159
+ }
160
+
161
+ /**
162
+ * Rotate the anchor object.
163
+ * @param $angle is an integer.
164
+ */
165
+ function rotation($angle)
166
+ {
167
+ $this->rotation = $angle;
168
+ return $this;
169
+ }
170
+ }
171
+
172
+ /**
173
+ * An <i><b>n</b></i> sided shape.
174
+ */
175
+ class anchor extends dot_base
176
+ {
177
+ /**
178
+ * The constructor, takes an optional $value
179
+ */
180
+ function anchor($value=null)
181
+ {
182
+ parent::dot_base( 'anchor', $value );
183
+ }
184
+
185
+ /**
186
+ * Rotate the anchor object.
187
+ * @param $angle is an integer.
188
+ */
189
+ function rotation($angle)
190
+ {
191
+ $this->rotation = $angle;
192
+ return $this;
193
+ }
194
+
195
+ /**
196
+ * @param $sides is an integer. Number of sides this shape has.
197
+ */
198
+ function sides($sides)
199
+ {
200
+ $this->sides = $sides;
201
+ return $this;
202
+ }
203
+ }
204
+
205
+ /**
206
+ * A simple dot
207
+ */
208
+ class dot extends dot_base
209
+ {
210
+ /**
211
+ * The constructor, takes an optional $value
212
+ */
213
+ function dot($value=null)
214
+ {
215
+ parent::dot_base( 'dot', $value );
216
+ }
217
+ }
218
+
219
+ /**
220
+ * A simple dot
221
+ */
222
+ class solid_dot extends dot_base
223
+ {
224
+ /**
225
+ * The constructor, takes an optional $value
226
+ */
227
+ function solid_dot($value=null)
228
+ {
229
+ parent::dot_base( 'solid-dot', $value );
230
+ }
231
+ }
includes/version-2-ichor/php-ofc-library/json_format.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Pretty print some JSON
4
+ function json_format($json)
5
+ {
6
+ $tab = " ";
7
+ $new_json = "";
8
+ $indent_level = 0;
9
+ $in_string = false;
10
+
11
+ /*
12
+ commented out by monk.e.boy 22nd May '08
13
+ because my web server is PHP4, and
14
+ json_* are PHP5 functions...
15
+
16
+ $json_obj = json_decode($json);
17
+
18
+ if($json_obj === false)
19
+ return false;
20
+
21
+ $json = json_encode($json_obj);
22
+ */
23
+ $len = strlen($json);
24
+
25
+ for($c = 0; $c < $len; $c++)
26
+ {
27
+ $char = $json[$c];
28
+ switch($char)
29
+ {
30
+ case '{':
31
+ case '[':
32
+ if(!$in_string)
33
+ {
34
+ $new_json .= $char . "\n" . str_repeat($tab, $indent_level+1);
35
+ $indent_level++;
36
+ }
37
+ else
38
+ {
39
+ $new_json .= $char;
40
+ }
41
+ break;
42
+ case '}':
43
+ case ']':
44
+ if(!$in_string)
45
+ {
46
+ $indent_level--;
47
+ $new_json .= "\n" . str_repeat($tab, $indent_level) . $char;
48
+ }
49
+ else
50
+ {
51
+ $new_json .= $char;
52
+ }
53
+ break;
54
+ case ',':
55
+ if(!$in_string)
56
+ {
57
+ $new_json .= ",\n" . str_repeat($tab, $indent_level);
58
+ }
59
+ else
60
+ {
61
+ $new_json .= $char;
62
+ }
63
+ break;
64
+ case ':':
65
+ if(!$in_string)
66
+ {
67
+ $new_json .= ": ";
68
+ }
69
+ else
70
+ {
71
+ $new_json .= $char;
72
+ }
73
+ break;
74
+ case '"':
75
+ if($c > 0 && $json[$c-1] != '\\')
76
+ {
77
+ $in_string = !$in_string;
78
+ }
79
+ default:
80
+ $new_json .= $char;
81
+ break;
82
+ }
83
+ }
84
+
85
+ return $new_json;
86
+ }
includes/version-2-ichor/php-ofc-library/ofc_area_base.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * inherits from line
5
+ */
6
+ class area extends line
7
+ {
8
+ function area()
9
+ {
10
+ $this->type = "area";
11
+ }
12
+
13
+ /**
14
+ * the fill colour
15
+ */
16
+ function set_fill_colour( $colour )
17
+ {
18
+ $this->fill = $colour;
19
+ }
20
+
21
+ /**
22
+ * sugar: see set_fill_colour
23
+ */
24
+ function fill_colour( $colour )
25
+ {
26
+ $this->set_fill_colour( $colour );
27
+ return $this;
28
+ }
29
+
30
+ function set_fill_alpha( $alpha )
31
+ {
32
+ $tmp = "fill-alpha";
33
+ $this->$tmp = $alpha;
34
+ }
35
+
36
+ function set_loop()
37
+ {
38
+ $this->loop = true;
39
+ }
40
+ }
includes/version-2-ichor/php-ofc-library/ofc_area_hollow.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class area_hollow extends area_base
4
+ {
5
+ function area_hollow()
6
+ {
7
+ $this->type = "area_hollow";
8
+ parent::area_base();
9
+ }
10
+ }
includes/version-2-ichor/php-ofc-library/ofc_area_line.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class area_line extends area_base
4
+ {
5
+ function area_line()
6
+ {
7
+ $this->type = "area_line";
8
+ parent::area_base();
9
+ }
10
+ }
includes/version-2-ichor/php-ofc-library/ofc_bar.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ include_once 'ofc_bar_base.php';
4
+
5
+ class bar_value
6
+ {
7
+ function bar_value( $top, $bottom=null )
8
+ {
9
+ $this->top = $top;
10
+
11
+ if( isset( $bottom ) )
12
+ $this->bottom = $bottom;
13
+ }
14
+
15
+ function set_colour( $colour )
16
+ {
17
+ $this->colour = $colour;
18
+ }
19
+
20
+ function set_tooltip( $tip )
21
+ {
22
+ $this->tip = $tip;
23
+ }
24
+ }
25
+
26
+ class bar extends bar_base
27
+ {
28
+ function bar()
29
+ {
30
+ $this->type = "bar";
31
+ parent::bar_base();
32
+ }
33
+ }
34
+
includes/version-2-ichor/php-ofc-library/ofc_bar_3d.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ include_once 'ofc_bar_base.php';
4
+
5
+ class bar_3d_value
6
+ {
7
+ function bar_3d_value( $top )
8
+ {
9
+ $this->top = $top;
10
+ }
11
+
12
+ function set_colour( $colour )
13
+ {
14
+ $this->colour = $colour;
15
+ }
16
+
17
+ function set_tooltip( $tip )
18
+ {
19
+ $this->tip = $tip;
20
+ }
21
+ }
22
+
includes/version-2-ichor/php-ofc-library/ofc_bar_base.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /* this is a base class */
4
+
5
+ class bar_base
6
+ {
7
+ function bar_base(){}
8
+
9
+ /**
10
+ * @param $text as string the key text
11
+ * @param $size as integer, size in pixels
12
+ */
13
+ function set_key( $text, $size )
14
+ {
15
+ $this->text = $text;
16
+ $tmp = 'font-size';
17
+ $this->$tmp = $size;
18
+ }
19
+
20
+ /**
21
+ * syntatical sugar.
22
+ */
23
+ function key( $text, $size )
24
+ {
25
+ $this->set_key( $text, $size );
26
+ }
27
+
28
+ /**
29
+ * @param $v as an array, a mix of:
30
+ * - a bar_value class. You can use this to customise the paramters of each bar.
31
+ * - integer. This is the Y position of the top of the bar.
32
+ */
33
+ function set_values( $v )
34
+ {
35
+ $this->values = $v;
36
+ }
37
+
38
+ /**
39
+ * see set_values
40
+ */
41
+ function append_value( $v )
42
+ {
43
+ $this->values[] = $v;
44
+ }
45
+
46
+ /**
47
+ * @param $colour as string, a HEX colour, e.g. '#ff0000' red
48
+ */
49
+ function set_colour( $colour )
50
+ {
51
+ $this->colour = $colour;
52
+ }
53
+
54
+ /**
55
+ *syntatical sugar
56
+ */
57
+ function colour( $colour )
58
+ {
59
+ $this->set_colour( $colour );
60
+ }
61
+
62
+ /**
63
+ * @param $alpha as real number (range 0 to 1), e.g. 0.5 is half transparent
64
+ */
65
+ function set_alpha( $alpha )
66
+ {
67
+ $this->alpha = $alpha;
68
+ }
69
+
70
+ /**
71
+ * @param $tip as string, the tip to show. May contain various magic variables.
72
+ */
73
+ function set_tooltip( $tip )
74
+ {
75
+ $this->tip = $tip;
76
+ }
77
+ }
78
+
includes/version-2-ichor/php-ofc-library/ofc_bar_filled.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ include_once 'ofc_bar_base.php';
4
+
5
+ class bar_filled_value extends bar_value
6
+ {
7
+ function bar_filled_value( $top, $bottom=null )
8
+ {
9
+ parent::bar_value( $top, $bottom );
10
+ }
11
+
12
+ function set_outline_colour( $outline_colour )
13
+ {
14
+ $tmp = 'outline-colour';
15
+ $this->$tmp = $outline_colour;
16
+ }
17
+ }
18
+
19
+ class bar_filled extends bar_base
20
+ {
21
+ function bar_filled( $colour=null, $outline_colour=null )
22
+ {
23
+ $this->type = "bar_filled";
24
+ parent::bar_base();
25
+
26
+ if( isset( $colour ) )
27
+ $this->set_colour( $colour );
28
+
29
+ if( isset( $outline_colour ) )
30
+ $this->set_outline_colour( $outline_colour );
31
+ }
32
+
33
+ function set_outline_colour( $outline_colour )
34
+ {
35
+ $tmp = 'outline-colour';
36
+ $this->$tmp = $outline_colour;
37
+ }
38
+ }
39
+
includes/version-2-ichor/php-ofc-library/ofc_bar_glass.php ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ include_once 'ofc_bar_base.php';
4
+
5
+ class bar_value
6
+ {
7
+ /**
8
+ * @param $top as integer. The Y value of the top of the bar
9
+ * @param OPTIONAL $bottom as integer. The Y value of the bottom of the bar, defaults to Y min.
10
+ */
11
+ function bar_value( $top, $bottom=null )
12
+ {
13
+ $this->top = $top;
14
+
15
+ if( isset( $bottom ) )
16
+ $this->bottom = $bottom;
17
+ }
18
+
19
+ function set_colour( $colour )
20
+ {
21
+ $this->colour = $colour;
22
+ }
23
+
24
+ function set_tooltip( $tip )
25
+ {
26
+ $this->tip = $tip;
27
+ }
28
+ }
29
+
30
+ class bar extends bar_base
31
+ {
32
+ function bar()
33
+ {
34
+ $this->type = "bar";
35
+ parent::bar_base();
36
+ }
37
+ }
38
+
39
+ class bar_glass extends bar_base
40
+ {
41
+ function bar_glass()
42
+ {
43
+ $this->type = "bar_glass";
44
+ parent::bar_base();
45
+ }
46
+ }
47
+
48
+ class bar_cylinder extends bar_base
49
+ {
50
+ function bar_cylinder()
51
+ {
52
+ $this->type = "bar_cylinder";
53
+ parent::bar_base();
54
+ }
55
+ }
56
+
57
+ class bar_cylinder_outline extends bar_base
58
+ {
59
+ function bar_cylinder_outline()
60
+ {
61
+ $this->type = "bar_cylinder_outline";
62
+ parent::bar_base();
63
+ }
64
+ }
65
+
66
+ class bar_rounded_glass extends bar_base
67
+ {
68
+ function bar_rounded_glass()
69
+ {
70
+ $this->type = "bar_round_glass";
71
+ parent::bar_base();
72
+ }
73
+ }
74
+
75
+ class bar_round extends bar_base
76
+ {
77
+ function bar_round()
78
+ {
79
+ $this->type = "bar_round";
80
+ parent::bar_base();
81
+ }
82
+ }
83
+
84
+ class bar_dome extends bar_base
85
+ {
86
+ function bar_dome()
87
+ {
88
+ $this->type = "bar_dome";
89
+ parent::bar_base();
90
+ }
91
+ }
92
+
93
+ class bar_round3d extends bar_base
94
+ {
95
+ function bar_round3d()
96
+ {
97
+ $this->type = "bar_round3d";
98
+ parent::bar_base();
99
+ }
100
+ }
101
+
102
+ class bar_3d extends bar_base
103
+ {
104
+ function bar_3d()
105
+ {
106
+ $this->type = "bar_3d";
107
+ parent::bar_base();
108
+ }
109
+ }
includes/version-2-ichor/php-ofc-library/ofc_bar_sketch.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ include_once 'ofc_bar_base.php';
4
+
5
+ class bar_sketch extends bar_base
6
+ {
7
+ /**
8
+ * @param $colour as string, HEX colour e.g. '#00ff00'
9
+ * @param $outline_colour as string, HEX colour e.g. '#ff0000'
10
+ * @param $fun_factor as integer, range 0 to 10. 0,1 and 2 are pretty boring.
11
+ * 4 to 6 is a bit fun, 7 and above is lots of fun.
12
+ */
13
+ function bar_sketch( $colour, $outline_colour, $fun_factor )
14
+ {
15
+ $this->type = "bar_sketch";
16
+ parent::bar_base();
17
+
18
+ $this->set_colour( $colour );
19
+ $this->set_outline_colour( $outline_colour );
20
+ $this->offset = $fun_factor;
21
+ }
22
+
23
+ function set_outline_colour( $outline_colour )
24
+ {
25
+ $tmp = 'outline-colour';
26
+ $this->$tmp = $outline_colour;
27
+ }
28
+ }
29
+
includes/version-2-ichor/php-ofc-library/ofc_bar_stack.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ include_once 'ofc_bar_base.php';
4
+
5
+ class bar_stack extends bar_base
6
+ {
7
+ function bar_stack()
8
+ {
9
+ $this->type = "bar_stack";
10
+ parent::bar_base();
11
+ }
12
+
13
+ function append_stack( $v )
14
+ {
15
+ $this->append_value( $v );
16
+ }
17
+
18
+ // an array of HEX colours strings
19
+ // e.g. array( '#ff0000', '#00ff00' );
20
+ function set_colours( $colours )
21
+ {
22
+ $this->colours = $colours;
23
+ }
24
+
25
+ // an array of bar_stack_value
26
+ function set_keys( $keys )
27
+ {
28
+ $this->keys = $keys;
29
+ }
30
+ }
31
+
32
+ class bar_stack_value
33
+ {
34
+ function bar_stack_value( $val, $colour )
35
+ {
36
+ $this->val = $val;
37
+ $this->colour = $colour;
38
+ }
39
+ }
40
+
41
+ class bar_stack_key
42
+ {
43
+ function bar_stack_key( $colour, $text, $font_size )
44
+ {
45
+ $this->colour = $colour;
46
+ $this->text = $text;
47
+ $tmp = 'font-size';
48
+ $this->$tmp = $font_size;
49
+ }
50
+ }
includes/version-2-ichor/php-ofc-library/ofc_hbar.php ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class hbar_value
4
+ {
5
+ function hbar_value( $left, $right=null )
6
+ {
7
+ if( isset( $right ) )
8
+ {
9
+ $this->left = $left;
10
+ $this->right = $right;
11
+ }
12
+ else
13
+ $this->right = $left;
14
+ }
15
+
16
+ function set_colour( $colour )
17
+ {
18
+ $this->colour = $colour;
19
+ }
20
+
21
+ function set_tooltip( $tip )
22
+ {
23
+ $this->tip = $tip;
24
+ }
25
+ }
26
+
27
+ class hbar
28
+ {
29
+ function hbar( $colour )
30
+ {
31
+ $this->type = "hbar";
32
+ $this->values = array();
33
+ $this->set_colour( $colour );
34
+ }
35
+
36
+ function append_value( $v )
37
+ {
38
+ $this->values[] = $v;
39
+ }
40
+
41
+ function set_values( $v )
42
+ {
43
+ foreach( $v as $val )
44
+ $this->append_value( new hbar_value( $val ) );
45
+ }
46
+
47
+ function set_colour( $colour )
48
+ {
49
+ $this->colour = $colour;
50
+ }
51
+
52
+ function set_key( $text, $size )
53
+ {
54
+ $this->text = $text;
55
+ $tmp = 'font-size';
56
+ $this->$tmp = $size;
57
+ }
58
+
59
+ function set_tooltip( $tip )
60
+ {
61
+ $this->tip = $tip;
62
+ }
63
+ }
64
+
includes/version-2-ichor/php-ofc-library/ofc_line.php ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class line
4
+ {
5
+ function line()
6
+ {
7
+ $this->type = "line";
8
+ $this->values = array();
9
+ }
10
+
11
+ /**
12
+ * Set the default dot that all the real
13
+ * dots inherit their properties from. If you set the
14
+ * default dot to be red, all values in your chart that
15
+ * do not specify a colour will be red. Same for all the
16
+ * other attributes such as tooltip, on-click, size etc...
17
+ *
18
+ * @param $style as any class that inherits base_dot
19
+ */
20
+ function set_default_dot_style( $style )
21
+ {
22
+ $tmp = 'dot-style';
23
+ $this->$tmp = $style;
24
+ }
25
+
26
+ /**
27
+ * @param $v as array, can contain any combination of:
28
+ * - integer, Y position of the point
29
+ * - any class that inherits from dot_base
30
+ * - <b>null</b>
31
+ */
32
+ function set_values( $v )
33
+ {
34
+ $this->values = $v;
35
+ }
36
+
37
+ /**
38
+ * Append a value to the line.
39
+ *
40
+ * @param mixed $v
41
+ */
42
+ function append_value($v)
43
+ {
44
+ $this->values[] = $v;
45
+ }
46
+
47
+ function set_width( $width )
48
+ {
49
+ $this->width = $width;
50
+ }
51
+
52
+ function set_colour( $colour )
53
+ {
54
+ $this->colour = $colour;
55
+ }
56
+
57
+ /**
58
+ * sytnatical sugar for set_colour
59
+ */
60
+ function colour( $colour )
61
+ {
62
+ $this->set_colour( $colour );
63
+ return $this;
64
+ }
65
+
66
+ function set_halo_size( $size )
67
+ {
68
+ $tmp = 'halo-size';
69
+ $this->$tmp = $size;
70
+ }
71
+
72
+ function set_key( $text, $font_size )
73
+ {
74
+ $this->text = $text;
75
+ $tmp = 'font-size';
76
+ $this->$tmp = $font_size;
77
+ }
78
+
79
+ function set_tooltip( $tip )
80
+ {
81
+ $this->tip = $tip;
82
+ }
83
+
84
+ function set_on_click( $text )
85
+ {
86
+ $tmp = 'on-click';
87
+ $this->$tmp = $text;
88
+ }
89
+
90
+ function loop()
91
+ {
92
+ $this->loop = true;
93
+ }
94
+
95
+ function line_style( $s )
96
+ {
97
+ $tmp = "line-style";
98
+ $this->$tmp = $s;
99
+ }
100
+
101
+ /**
102
+ * Sets the text for the line.
103
+ *
104
+ * @param string $text
105
+ */
106
+ function set_text($text)
107
+ {
108
+ $this->text = $text;
109
+ }
110
+
111
+ function attach_to_right_y_axis()
112
+ {
113
+ $this->axis = 'right';
114
+ }
115
+ }
includes/version-2-ichor/php-ofc-library/ofc_line_base.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class line_base
4
+ {
5
+ function line_base()
6
+ {
7
+ $this->type = "line";
8
+ $this->text = "Page views";
9
+ $tmp = 'font-size';
10
+ $this->$tmp = 10;
11
+
12
+ $this->values = array();
13
+ }
14
+
15
+ function set_values( $v )
16
+ {
17
+ $this->values = $v;
18
+ }
19
+
20
+ /**
21
+ * Append a value to the line.
22
+ *
23
+ * @param mixed $v
24
+ */
25
+ function append_value($v)
26
+ {
27
+ $this->values[] = $v;
28
+ }
29
+
30
+ function set_width( $width )
31
+ {
32
+ $this->width = $width;
33
+ }
34
+
35
+ function set_colour( $colour )
36
+ {
37
+ $this->colour = $colour;
38
+ }
39
+
40
+ function set_dot_size( $size )
41
+ {
42
+ $tmp = 'dot-size';
43
+ $this->$tmp = $size;
44
+ }
45
+
46
+ function set_halo_size( $size )
47
+ {
48
+ $tmp = 'halo-size';
49
+ $this->$tmp = $size;
50
+ }
51
+
52
+ function set_key( $text, $font_size )
53
+ {
54
+ $this->text = $text;
55
+ $tmp = 'font-size';
56
+ $this->$tmp = $font_size;
57
+ }
58
+
59
+ function set_tooltip( $tip )
60
+ {
61
+ $this->tip = $tip;
62
+ }
63
+
64
+ function set_on_click( $text )
65
+ {
66
+ $tmp = 'on-click';
67
+ $this->$tmp = $text;
68
+ }
69
+
70
+ function loop()
71
+ {
72
+ $this->loop = true;
73
+ }
74
+
75
+ function line_style( $s )
76
+ {
77
+ $tmp = "line-style";
78
+ $this->$tmp = $s;
79
+ }
80
+
81
+ /**
82
+ * Sets the text for the line.
83
+ *
84
+ * @param string $text
85
+ */
86
+ function set_text($text)
87
+ {
88
+ $this->text = $text;
89
+ }
90
+
91
+
92
+ }
includes/version-2-ichor/php-ofc-library/ofc_line_dot.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class dot_value
4
+ {
5
+ function dot_value( $value, $colour )
6
+ {
7
+ $this->value = $value;
8
+ $this->colour = $colour;
9
+ }
10
+
11
+ function set_colour( $colour )
12
+ {
13
+ $this->colour = $colour;
14
+ }
15
+
16
+ function set_size( $size )
17
+ {
18
+ $this->size = $size;
19
+ }
20
+
21
+ function set_tooltip( $tip )
22
+ {
23
+ $this->tip = $tip;
24
+ }
25
+ }
26
+
27
+ class line_dot extends line_base
28
+ {
29
+ function line_dot()
30
+ {
31
+ $this->type = "line_dot";
32
+ }
33
+ }
includes/version-2-ichor/php-ofc-library/ofc_line_hollow.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class line_hollow extends line_base
4
+ {
5
+ function line_hollow()
6
+ {
7
+ $this->type = "line_hollow";
8
+ }
9
+ }
includes/version-2-ichor/php-ofc-library/ofc_line_style.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class line_style
4
+ {
5
+ function line_style($on, $off)
6
+ {
7
+ $this->style = "dash";
8
+ $this->on = $on;
9
+ $this->off = $off;
10
+ }
11
+ }
includes/version-2-ichor/php-ofc-library/ofc_menu.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class ofc_menu_item
4
+ {
5
+ /**
6
+ * @param $text as string. The menu item text.
7
+ * @param $javascript_function_name as string. The javascript function name, the
8
+ * js function takes one parameter, the chart ID. See ofc_menu_item_camera for
9
+ * some example code.
10
+ */
11
+ function ofc_menu_item($text, $javascript_function_name)
12
+ {
13
+ $this->type = "text";
14
+ $this->text = $text;
15
+ $tmp = 'javascript-function';
16
+ $this->$tmp = $javascript_function_name;
17
+ }
18
+ }
19
+
20
+ class ofc_menu_item_camera
21
+ {
22
+ /**
23
+ * @param $text as string. The menu item text.
24
+ * @param $javascript_function_name as string. The javascript function name, the
25
+ * js function takes one parameter, the chart ID. So for example, our js function
26
+ * could look like this:
27
+ *
28
+ * function save_image( chart_id )
29
+ * {
30
+ * alert( chart_id );
31
+ * }
32
+ *
33
+ * to make a menu item call this: ofc_menu_item_camera('Save chart', 'save_image');
34
+ */
35
+ function ofc_menu_item_camera($text, $javascript_function_name)
36
+ {
37
+ $this->type = "camera-icon";
38
+ $this->text = $text;
39
+ $tmp = 'javascript-function';
40
+ $this->$tmp = $javascript_function_name;
41
+ }
42
+ }
43
+
44
+ class ofc_menu
45
+ {
46
+ function ofc_menu($colour, $outline_colour)
47
+ {
48
+ $this->colour = $colour;
49
+ $this->outline_colour = $outline_colour;
50
+ }
51
+
52
+ function values($values)
53
+ {
54
+ $this->values = $values;
55
+ }
56
+ }
includes/version-2-ichor/php-ofc-library/ofc_pie.php ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class pie_value
4
+ {
5
+ function pie_value( $value, $label )
6
+ {
7
+ $this->value = $value;
8
+ $this->label = $label;
9
+ }
10
+
11
+ function set_colour( $colour )
12
+ {
13
+ $this->colour = $colour;
14
+ }
15
+
16
+ function set_label( $label, $label_colour, $font_size )
17
+ {
18
+ $this->label = $label;
19
+
20
+ $tmp = 'label-colour';
21
+ $this->$tmp = $label_colour;
22
+
23
+ $tmp = 'font-size';
24
+ $this->$tmp = $font_size;
25
+
26
+ }
27
+
28
+ function set_tooltip( $tip )
29
+ {
30
+ $this->tip = $tip;
31
+ }
32
+
33
+ function on_click( $event )
34
+ {
35
+ $tmp = 'on-click';
36
+ $this->$tmp = $event;
37
+ }
38
+
39
+
40
+ /**
41
+ * An object that inherits from base_pie_animation
42
+ */
43
+ function add_animation( $animation )
44
+ {
45
+ if( !isset( $this->animate ) )
46
+ $this->animate = array();
47
+
48
+ $this->animate[] = $animation;
49
+
50
+ return $this;
51
+ }
52
+ }
53
+
54
+ class base_pie_animation{}
55
+
56
+ /**
57
+ * fade the pie slice from $alpha (pie set_alpha) to 100% opaque.
58
+ */
59
+ class pie_fade extends base_pie_animation
60
+ {
61
+ function pie_fade()
62
+ {
63
+ $this->type="fade";
64
+ }
65
+ }
66
+
67
+ /**
68
+ * Bounce the pie slice out a little
69
+ */
70
+ class pie_bounce extends base_pie_animation
71
+ {
72
+ /**
73
+ * @param $distance as integer, distance to bounce in pixels
74
+ */
75
+ function pie_bounce( $distance )
76
+ {
77
+ $this->type="bounce";
78
+ $this->distance = $distance;
79
+ }
80
+ }
81
+
82
+ /**
83
+ * Make a pie chart and fill it with pie slices
84
+ */
85
+ class pie
86
+ {
87
+ function pie()
88
+ {
89
+ $this->type = 'pie';
90
+ }
91
+
92
+ function set_colours( $colours )
93
+ {
94
+ $this->colours = $colours;
95
+ }
96
+
97
+ /**
98
+ * Sugar wrapped around set_colours
99
+ */
100
+ function colours( $colours )
101
+ {
102
+ $this->set_colours( $colours );
103
+ return $this;
104
+ }
105
+
106
+ /**
107
+ * @param $alpha as float (0-1) 0.75 = 3/4 visible
108
+ */
109
+ function set_alpha( $alpha )
110
+ {
111
+ $this->alpha = $alpha;
112
+ }
113
+
114
+ /**
115
+ *sugar wrapped set_alpha
116
+ **/
117
+ function alpha( $alpha )
118
+ {
119
+ $this->set_alpha( $alpha );
120
+ return $this;
121
+ }
122
+
123
+ /**
124
+ * @param $v as array containing one of
125
+ * - null
126
+ * - real or integer number
127
+ * - a pie_value object
128
+ */
129
+ function set_values( $v )
130
+ {
131
+ $this->values = $v;
132
+ }
133
+
134
+ /**
135
+ * sugar for set_values
136
+ */
137
+ function values( $v )
138
+ {
139
+ $this->set_values( $v );
140
+ return $this;
141
+ }
142
+
143
+ /**
144
+ * HACK to keep old code working.
145
+ */
146
+ function set_animate( $bool )
147
+ {
148
+ if( $bool )
149
+ $this->add_animation( new pie_fade() );
150
+
151
+ }
152
+
153
+ /**
154
+ * An object that inherits from base_pie_animation
155
+ */
156
+ function add_animation( $animation )
157
+ {
158
+ if( !isset( $this->animate ) )
159
+ $this->animate = array();
160
+
161
+ $this->animate[] = $animation;
162
+
163
+ return $this;
164
+ }
165
+
166
+ /**
167
+ * @param $angle as real number
168
+ */
169
+ function set_start_angle( $angle )
170
+ {
171
+ $tmp = 'start-angle';
172
+ $this->$tmp = $angle;
173
+ }
174
+
175
+ /**
176
+ * sugar for set_start_angle
177
+ */
178
+ function start_angle($angle)
179
+ {
180
+ $this->set_start_angle( $angle );
181
+ return $this;
182
+ }
183
+
184
+ /**
185
+ * @param $tip as string. The tooltip text. May contain magic varibles
186
+ */
187
+ function set_tooltip( $tip )
188
+ {
189
+ $this->tip = $tip;
190
+ }
191
+
192
+ /**
193
+ * sugar for set_tooltip
194
+ */
195
+ function tooltip( $tip )
196
+ {
197
+ $this->set_tooltip( $tip );
198
+ return $this;
199
+ }
200
+
201
+ function set_gradient_fill()
202
+ {
203
+ $tmp = 'gradient-fill';
204
+ $this->$tmp = true;
205
+ }
206
+
207
+ function gradient_fill()
208
+ {
209
+ $this->set_gradient_fill();
210
+ return $this;
211
+ }
212
+
213
+ /**
214
+ * By default each label is the same colour as the slice,
215
+ * but you can ovveride that behaviour using this method.
216
+ *
217
+ * @param $label_colour as string HEX colour;
218
+ */
219
+ function set_label_colour( $label_colour )
220
+ {
221
+ $tmp = 'label-colour';
222
+ $this->$tmp = $label_colour;
223
+ }
224
+
225
+ function label_colour( $label_colour )
226
+ {
227
+ $this->set_label_colour( $label_colour );
228
+ return $this;
229
+ }
230
+
231
+ /**
232
+ * Turn off the labels
233
+ */
234
+ function set_no_labels()
235
+ {
236
+ $tmp = 'no-labels';
237
+ $this->$tmp = true;
238
+ }
239
+
240
+ function on_click( $event )
241
+ {
242
+ $tmp = 'on-click';
243
+ $this->$tmp = $event;
244
+ }
245
+
246
+ /**
247
+ * Fix the radius of the pie chart. Take a look at the magic variable #radius#
248
+ * for helping figure out what radius to set it to.
249
+ *
250
+ * @param $radius as number
251
+ */
252
+ function radius( $radius )
253
+ {
254
+ $this->radius = $radius;
255
+ return $this;
256
+ }
257
+ }
includes/version-2-ichor/php-ofc-library/ofc_radar_axis.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class radar_axis
4
+ {
5
+ function radar_axis( $max )
6
+ {
7
+ $this->set_max( $max );
8
+ }
9
+
10
+ function set_max( $max )
11
+ {
12
+ $this->max = $max;
13
+ }
14
+
15
+ function set_steps( $steps )
16
+ {
17
+ $this->steps = $steps;
18
+ }
19
+
20
+ function set_stroke( $s )
21
+ {
22
+ $this->stroke = $s;
23
+ }
24
+
25
+ function set_colour( $colour )
26
+ {
27
+ $this->colour = $colour;
28
+ }
29
+
30
+ function set_grid_colour( $colour )
31
+ {
32
+ $tmp = 'grid-colour';
33
+ $this->$tmp = $colour;
34
+ }
35
+
36
+ function set_labels( $labels )
37
+ {
38
+ $this->labels = $labels;
39
+ }
40
+
41
+ function set_spoke_labels( $labels )
42
+ {
43
+ $tmp = 'spoke-labels';
44
+ $this->$tmp = $labels;
45
+ }
46
+ }
47
+
includes/version-2-ichor/php-ofc-library/ofc_radar_axis_labels.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class radar_axis_labels
4
+ {
5
+ // $labels : array
6
+ function radar_axis_labels( $labels )
7
+ {
8
+ $this->labels = $labels;
9
+ }
10
+
11
+ function set_colour( $colour )
12
+ {
13
+ $this->colour = $colour;
14
+ }
15
+ }
includes/version-2-ichor/php-ofc-library/ofc_radar_spoke_labels.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class radar_spoke_labels
4
+ {
5
+ // $labels : array
6
+ function radar_spoke_labels( $labels )
7
+ {
8
+ $this->labels = $labels;
9
+ }
10
+
11
+ function set_colour( $colour )
12
+ {
13
+ $this->colour = $colour;
14
+ }
15
+ }
includes/version-2-ichor/php-ofc-library/ofc_scatter.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class scatter_value
4
+ {
5
+ function scatter_value( $x, $y, $dot_size=-1 )
6
+ {
7
+ $this->x = $x;
8
+ $this->y = $y;
9
+
10
+ if( $dot_size > 0 )
11
+ {
12
+ $tmp = 'dot-size';
13
+ $this->$tmp = $dot_size;
14
+ }
15
+ }
16
+ }
17
+
18
+ class scatter
19
+ {
20
+ function scatter( $colour )
21
+ {
22
+ $this->type = "scatter";
23
+ $this->set_colour( $colour );
24
+ }
25
+
26
+ function set_colour( $colour )
27
+ {
28
+ $this->colour = $colour;
29
+ }
30
+
31
+ function set_default_dot_style( $style )
32
+ {
33
+ $tmp = 'dot-style';
34
+ $this->$tmp = $style;
35
+ }
36
+
37
+ /**
38
+ * @param $v as array, can contain any combination of:
39
+ * - integer, Y position of the point
40
+ * - any class that inherits from scatter_value
41
+ * - <b>null</b>
42
+ */
43
+ function set_values( $values )
44
+ {
45
+ $this->values = $values;
46
+ }
47
+ }
includes/version-2-ichor/php-ofc-library/ofc_scatter_line.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class scatter_line
4
+ {
5
+ function scatter_line( $colour )
6
+ {
7
+ $this->type = "scatter_line";
8
+ $this->set_colour( $colour );
9
+ }
10
+
11
+ function set_default_dot_style( $style )
12
+ {
13
+ $tmp = 'dot-style';
14
+ $this->$tmp = $style;
15
+ }
16
+
17
+ function set_colour( $colour )
18
+ {
19
+ $this->colour = $colour;
20
+ }
21
+
22
+ function set_values( $values )
23
+ {
24
+ $this->values = $values;
25
+ }
26
+
27
+ function set_step_horizontal()
28
+ {
29
+ $this->stepgraph = 'horizontal';
30
+ }
31
+
32
+ function set_step_vertical()
33
+ {
34
+ $this->stepgraph = 'vertical';
35
+ }
36
+
37
+ function set_key( $text, $font_size )
38
+ {
39
+ $this->text = $text;
40
+ $tmp = 'font-size';
41
+ $this->$tmp = $font_size;
42
+ }
43
+ }
includes/version-2-ichor/php-ofc-library/ofc_shape.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class shape_point
4
+ {
5
+ function shape_point( $x, $y )
6
+ {
7
+ $this->x = $x;
8
+ $this->y = $y;
9
+ }
10
+ }
11
+
12
+ class shape
13
+ {
14
+ function shape( $colour )
15
+ {
16
+ $this->type = "shape";
17
+ $this->colour = $colour;
18
+ $this->values = array();
19
+ }
20
+
21
+ function append_value( $p )
22
+ {
23
+ $this->values[] = $p;
24
+ }
25
+ }
includes/version-2-ichor/php-ofc-library/ofc_sugar.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Sugar: to make stars easier sometimes
5
+ */
6
+ class s_star extends star
7
+ {
8
+ /**
9
+ * I use this wrapper for default dot types,
10
+ * it just makes the code easier to read.
11
+ */
12
+ function s_star($colour, $size)
13
+ {
14
+ parent::star();
15
+ $this->colour($colour)->size($size);
16
+ }
17
+ }
18
+
19
+ class s_box extends anchor
20
+ {
21
+ /**
22
+ * I use this wrapper for default dot types,
23
+ * it just makes the code easier to read.
24
+ */
25
+ function s_box($colour, $size)
26
+ {
27
+ parent::anchor();
28
+ $this->colour($colour)->size($size)->rotation(45)->sides(4);
29
+ }
30
+ }
31
+
32
+ class s_hollow_dot extends hollow_dot
33
+ {
34
+ /**
35
+ * I use this wrapper for default dot types,
36
+ * it just makes the code easier to read.
37
+ */
38
+ function s_hollow_dot($colour, $size)
39
+ {
40
+ parent::hollow_dot();
41
+ $this->colour($colour)->size($size);
42
+ }
43
+ }
includes/version-2-ichor/php-ofc-library/ofc_title.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Set the title of a chart, make one of these and pass it into
5
+ * open_flash_chart set_title
6
+ */
7
+ class title
8
+ {
9
+ function title( $text='' )
10
+ {
11
+ $this->text = $text;
12
+ }
13
+
14
+ /**
15
+ * A css string. Can optionally contain:
16
+ * - font-size
17
+ * - font-family
18
+ * - font-weight
19
+ * - color
20
+ * - background-color
21
+ * - text-align
22
+ * - margin
23
+ * - margin-left
24
+ * - margin-right
25
+ * - margin-top
26
+ * - margin-bottom
27
+ * - padding
28
+ * - padding-left
29
+ * - padding-right
30
+ * - padding-top
31
+ * - padding-bottom
32
+ * just like the css we use all the time :-)
33
+ */
34
+ function set_style( $css )
35
+ {
36
+ $this->style = $css;
37
+ //"{font-size: 20px; color:#0000ff; font-family: Verdana; text-align: center;}";
38
+ }
39
+ }
includes/version-2-ichor/php-ofc-library/ofc_tooltip.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ include_once 'ofc_bar_base.php';
4
+
5
+ class tooltip
6
+ {
7
+ function tooltip(){}
8
+
9
+ /**
10
+ * @param $shadow as boolean. Enable drop shadow.
11
+ */
12
+ function set_shadow( $shadow )
13
+ {
14
+ $this->shadow = $shadow;
15
+ }
16
+
17
+ /**
18
+ * @param $stroke as integer, border width in pixels (e.g. 5 )
19
+ */
20
+ function set_stroke( $stroke )
21
+ {
22
+ $this->stroke = $stroke;
23
+ }
24
+
25
+ /**
26
+ * @param $colour as string, HEX colour e.g. '#0000ff'
27
+ */
28
+ function set_colour( $colour )
29
+ {
30
+ $this->colour = $colour;
31
+ }
32
+
33
+ /**
34
+ * @param $bg as string, HEX colour e.g. '#0000ff'
35
+ */
36
+ function set_background_colour( $bg )
37
+ {
38
+ $this->background = $bg;
39
+ }
40
+
41
+ /**
42
+ * @param $style as string. A css style.
43
+ */
44
+ function set_title_style( $style )
45
+ {
46
+ $this->title = $style;
47
+ }
48
+
49
+ /**
50
+ * @param $style as string. A css style.
51
+ */
52
+ function set_body_style( $style )
53
+ {
54
+ $this->body = $style;
55
+ }
56
+
57
+ function set_proximity()
58
+ {
59
+ $this->mouse = 1;
60
+ }
61
+
62
+ function set_hover()
63
+ {
64
+ $this->mouse = 2;
65
+ }
66
+ }
67
+
includes/version-2-ichor/php-ofc-library/ofc_upload_image.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ //
4
+ // In Open Flash Chart -> save_image debug mode, you
5
+ // will see the 'echo' text in a new window.
6
+ //
7
+
8
+ /*
9
+
10
+ print_r( $_GET );
11
+ print_r( $_POST );
12
+ print_r( $_FILES );
13
+
14
+ print_r( $GLOBALS );
15
+ print_r( $GLOBALS["HTTP_RAW_POST_DATA"] );
16
+
17
+ */
18
+
19
+
20
+ // default path for the image to be stored //
21
+ $default_path = '../tmp-upload-images/';
22
+
23
+ if (!file_exists($default_path)) mkdir($default_path, 0777, true);
24
+
25
+ // full path to the saved image including filename //
26
+ $destination = $default_path . basename( $_GET[ 'name' ] );
27
+
28
+ echo 'Saving your image to: '. $destination;
29
+ // print_r( $_POST );
30
+ // print_r( $_SERVER );
31
+ // echo $HTTP_RAW_POST_DATA;
32
+
33
+ //
34
+ // POST data is usually string data, but we are passing a RAW .png
35
+ // so PHP is a bit confused and $_POST is empty. But it has saved
36
+ // the raw bits into $HTTP_RAW_POST_DATA
37
+ //
38
+
39
+ $jfh = fopen($destination, 'w') or die("can't open file");
40
+ fwrite($jfh, $HTTP_RAW_POST_DATA);
41
+ fclose($jfh);
42
+
43
+ //
44
+ // LOOK:
45
+ //
46
+ exit();
47
+
48
+
49
+ //
50
+ // PHP5:
51
+ //
52
+
53
+
54
+ // default path for the image to be stored //
55
+ $default_path = 'tmp-upload-images/';
56
+
57
+ if (!file_exists($default_path)) mkdir($default_path, 0777, true);
58
+
59
+ // full path to the saved image including filename //
60
+ $destination = $default_path . basename( $_FILES[ 'Filedata' ][ 'name' ] );
61
+
62
+ // move the image into the specified directory //
63
+ if (move_uploaded_file($_FILES[ 'Filedata' ][ 'tmp_name' ], $destination)) {
64
+ echo "The file " . basename( $_FILES[ 'Filedata' ][ 'name' ] ) . " has been uploaded;";
65
+ } else {
66
+ echo "FILE UPLOAD FAILED";
67
+ }
68
+
69
+
70
+ ?>
includes/version-2-ichor/php-ofc-library/ofc_x_axis.php ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class x_axis
4
+ {
5
+ function x_axis(){}
6
+
7
+ /**
8
+ * @param $stroke as integer, with of the line and ticks
9
+ */
10
+ function set_stroke( $stroke )
11
+ {
12
+ $this->stroke = $stroke;
13
+ }
14
+
15
+ /**
16
+ *@param $colour as string HEX colour
17
+ *@param $grid_colour as string HEX colour
18
+ */
19
+ function set_colours( $colour, $grid_colour )
20
+ {
21
+ $this->set_colour( $colour );
22
+ $this->set_grid_colour( $grid_colour );
23
+ }
24
+
25
+ /**
26
+ *@param $colour as string HEX colour
27
+ */
28
+ function set_colour( $colour )
29
+ {
30
+ $this->colour = $colour;
31
+ }
32
+
33
+ function set_tick_height( $height )
34
+ {
35
+ $tmp = 'tick-height';
36
+ $this->$tmp = $height;
37
+ }
38
+
39
+ function set_grid_colour( $colour )
40
+ {
41
+ $tmp = 'grid-colour';
42
+ $this->$tmp = $colour;
43
+ }
44
+
45
+ /**
46
+ * @param $o is a boolean. If true, the X axis start half a step in
47
+ * This defaults to True
48
+ */
49
+ function set_offset( $o )
50
+ {
51
+ $this->offset = $o?true:false;
52
+ }
53
+
54
+ /**
55
+ * @param $steps as integer. Which ticks are visible.
56
+ */
57
+ function set_steps( $steps )
58
+ {
59
+ $this->steps = $steps;
60
+ }
61
+
62
+ /**
63
+ * @param $val as an integer, the height in pixels of the 3D bar. Mostly
64
+ * used for the 3D bar chart.
65
+ */
66
+ function set_3d( $val )
67
+ {
68
+ $tmp = '3d';
69
+ $this->$tmp = $val;
70
+ }
71
+
72
+ /**
73
+ * @param $x_axis_labels as an x_axis_labels object
74
+ * Use this to customize the labels (colour, font, etc...)
75
+ */
76
+ function set_labels( $x_axis_labels )
77
+ {
78
+ //$this->labels = $v;
79
+ $this->labels = $x_axis_labels;
80
+ }
81
+
82
+ /**
83
+ * Sugar syntax: helper function to make the examples simpler.
84
+ * @param $a is an array of labels
85
+ */
86
+ function set_labels_from_array( $a )
87
+ {
88
+ $x_axis_labels = new x_axis_labels();
89
+ $x_axis_labels->set_labels( $a );
90
+ $this->labels = $x_axis_labels;
91
+
92
+ if( isset( $this->steps ) )
93
+ $x_axis_labels->set_steps( $this->steps );
94
+ }
95
+
96
+ /**
97
+ * min and max.
98
+ */
99
+ function set_range( $min, $max )
100
+ {
101
+ $this->min = $min;
102
+ $this->max = $max;
103
+ }
104
+ }
includes/version-2-ichor/php-ofc-library/ofc_x_axis_label.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * x_axis_label see x_axis_labels
5
+ */
6
+ class x_axis_label
7
+ {
8
+ function x_axis_label( $text, $colour, $size, $rotate )
9
+ {
10
+ $this->set_text( $text );
11
+ $this->set_colour( $colour );
12
+ $this->set_size( $size );
13
+ $this->set_rotate( $rotate );
14
+ }
15
+
16
+ function set_text( $text )
17
+ {
18
+ $this->text = $text;
19
+ }
20
+
21
+ function set_colour( $colour )
22
+ {
23
+ $this->colour = $colour;
24
+ }
25
+
26
+ function set_size( $size )
27
+ {
28
+ $this->size = $size;
29
+ }
30
+
31
+ function set_rotate( $rotate )
32
+ {
33
+ $this->rotate = $rotate;
34
+ }
35
+
36
+ function set_vertical()
37
+ {
38
+ $this->rotate = "vertical";
39
+ }
40
+
41
+ function set_visible()
42
+ {
43
+ $this->visible = true;
44
+ }
45
+ }
includes/version-2-ichor/php-ofc-library/ofc_x_axis_labels.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class x_axis_labels
4
+ {
5
+ function x_axis_labels(){}
6
+
7
+ function set_steps( $steps )
8
+ {
9
+ $this->steps = $steps;
10
+ }
11
+
12
+ /**
13
+ *
14
+ * @param $labels as an array of [x_axis_label or string]
15
+ */
16
+ function set_labels( $labels )
17
+ {
18
+ $this->labels = $labels;
19
+ }
20
+
21
+ function set_colour( $colour )
22
+ {
23
+ $this->colour = $colour;
24
+ }
25
+
26
+ /**
27
+ * font size in pixels
28
+ */
29
+ function set_size( $size )
30
+ {
31
+ $this->size = $size;
32
+ }
33
+
34
+ /**
35
+ * rotate labels
36
+ */
37
+ function set_vertical()
38
+ {
39
+ $this->rotate = 270;
40
+ }
41
+
42
+ function rotate( $angle )
43
+ {
44
+ $this->rotate = $angle;
45
+ }
46
+ }
includes/version-2-ichor/php-ofc-library/ofc_x_legend.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class x_legend
4
+ {
5
+ function x_legend( $text='' )
6
+ {
7
+ $this->text = $text;
8
+ }
9
+
10
+ function set_style( $css )
11
+ {
12
+ $this->style = $css;
13
+ //"{font-size: 20px; color:#0000ff; font-family: Verdana; text-align: center;}";
14
+ }
15
+ }
includes/version-2-ichor/php-ofc-library/ofc_y_axis.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class y_axis extends y_axis_base
4
+ {
5
+ function y_axis(){}
6
+
7
+ /**
8
+ * @param $colour as string. The grid are the lines inside the chart.
9
+ * HEX colour, e.g. '#ff0000'
10
+ */
11
+ function set_grid_colour( $colour )
12
+ {
13
+ $tmp = 'grid-colour';
14
+ $this->$tmp = $colour;
15
+ }
16
+
17
+ }
includes/version-2-ichor/php-ofc-library/ofc_y_axis_base.php ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class y_axis_labels
4
+ {
5
+ function y_axis_labels()
6
+ {
7
+ }
8
+
9
+ function set_text($text)
10
+ {
11
+ $this->text = $text;
12
+ }
13
+ }
14
+
15
+ class y_axis_base
16
+ {
17
+ function y_axis_base(){}
18
+
19
+ /**
20
+ * @param $s as integer, thickness of the Y axis line
21
+ */
22
+ function set_stroke( $s )
23
+ {
24
+ $this->stroke = $s;
25
+ }
26
+
27
+ /**
28
+ * @param $val as integer. The length of the ticks in pixels
29
+ */
30
+ function set_tick_length( $val )
31
+ {
32
+ $tmp = 'tick-length';
33
+ $this->$tmp = $val;
34
+ }
35
+
36
+ function set_colours( $colour, $grid_colour )
37
+ {
38
+ $this->set_colour( $colour );
39
+ $this->set_grid_colour( $grid_colour );
40
+ }
41
+
42
+ function set_colour( $colour )
43
+ {
44
+ $this->colour = $colour;
45
+ }
46
+
47
+ function set_grid_colour( $colour )
48
+ {
49
+ $tmp = 'grid-colour';
50
+ $this->$tmp = $colour;
51
+ }
52
+
53
+ /**
54
+ * Set min and max values, also (optionally) set the steps value.
55
+ * You can reverse the chart by setting min larger than max, e.g. min = 10
56
+ * and max = 0.
57
+ *
58
+ * @param $min as integer
59
+ * @param $max as integer
60
+ * @param $steps as integer.
61
+ */
62
+ function set_range( $min, $max, $steps=1 )
63
+ {
64
+ $this->min = $min;
65
+ $this->max = $max;
66
+ $this->set_steps( $steps );
67
+ }
68
+
69
+ /**
70
+ * Sugar for set_range
71
+ */
72
+ function range( $min, $max, $steps=1 )
73
+ {
74
+ $this->set_range( $min, $max, $steps );
75
+ return $this;
76
+ }
77
+
78
+ /**
79
+ * @param $off as Boolean. If true the Y axis is nudged up half a step.
80
+ */
81
+ function set_offset( $off )
82
+ {
83
+ $this->offset = $off?1:0;
84
+ }
85
+
86
+ /**
87
+ * @param $labels as an array of string values.
88
+ *
89
+ * By default the Y axis will show from min to max, but you can override this
90
+ * by passing in your own labels. Remember the Y axis min is at the bottom, so
91
+ * the labels will go from bottom to top.
92
+ */
93
+ function set_labels( $labels )
94
+ {
95
+ $this->labels = $labels;
96
+ }
97
+
98
+ /**
99
+ * Pass in some text for each label. This can contain magic variables "#val#" which
100
+ * will get replaced with the value for that Y axis label. Useful for:
101
+ * - "�#val#"
102
+ * - "#val#%"
103
+ * - "#val# million"
104
+ *
105
+ * @param $text as string.
106
+ */
107
+ function set_label_text( $text )
108
+ {
109
+ $tmp = new y_axis_labels();
110
+ $tmp->set_text( $text );
111
+ $this->labels = $tmp;
112
+ }
113
+
114
+ /**
115
+ * @param $steps as integer.
116
+ *
117
+ * Only show every $steps label, e.g. every 10th
118
+ */
119
+ function set_steps( $steps )
120
+ {
121
+ $this->steps = $steps;
122
+ }
123
+
124
+ /**
125
+ * Make the labels show vertical
126
+ */
127
+ function set_vertical()
128
+ {
129
+ $this->rotate = "vertical";
130
+ }
131
+ }
includes/version-2-ichor/php-ofc-library/ofc_y_axis_right.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class y_axis_right extends y_axis_base
4
+ {
5
+ function y_axis_right(){}
6
+ }
includes/version-2-ichor/php-ofc-library/ofc_y_legend.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class y_legend
4
+ {
5
+ function y_legend( $text='' )
6
+ {
7
+ $this->text = $text;
8
+ }
9
+
10
+ function set_style( $css )
11
+ {
12
+ $this->style = $css;
13
+ //"{font-size: 20px; color:#0000ff; font-family: Verdana; text-align: center;}";
14
+ }
15
+ }
includes/version-2-ichor/php-ofc-library/open-flash-chart-object.php ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function open_flash_chart_object_str( $width, $height, $url, $use_swfobject=true, $base='' )
4
+ {
5
+ //
6
+ // return the HTML as a string
7
+ //
8
+ return _ofc( $width, $height, $url, $use_swfobject, $base );
9
+ }
10
+
11
+ function open_flash_chart_object( $width, $height, $url, $use_swfobject=true, $base='' )
12
+ {
13
+ //
14
+ // stream the HTML into the page
15
+ //
16
+ echo _ofc( $width, $height, $url, $use_swfobject, $base );
17
+ }
18
+
19
+ function _ofc( $width, $height, $url, $use_swfobject, $base )
20
+ {
21
+ //
22
+ // I think we may use swfobject for all browsers,
23
+ // not JUST for IE...
24
+ //
25
+ //$ie = strstr(getenv('HTTP_USER_AGENT'), 'MSIE');
26
+
27
+ //
28
+ // escape the & and stuff:
29
+ //
30
+ $url = urlencode($url);
31
+
32
+ //
33
+ // output buffer
34
+ //
35
+ $out = array();
36
+
37
+ //
38
+ // check for http or https:
39
+ //
40
+ if (isset ($_SERVER['HTTPS']))
41
+ {
42
+ if (strtoupper ($_SERVER['HTTPS']) == 'ON')
43
+ {
44
+ $protocol = 'https';
45
+ }
46
+ else
47
+ {
48
+ $protocol = 'http';
49
+ }
50
+ }
51
+ else
52
+ {
53
+ $protocol = 'http';
54
+ }
55
+
56
+ //
57
+ // if there are more than one charts on the
58
+ // page, give each a different ID
59
+ //
60
+ global $open_flash_chart_seqno;
61
+ $obj_id = 'chart';
62
+ $div_name = 'flashcontent';
63
+
64
+ //$out[] = '<script type="text/javascript" src="'. $base .'js/ofc.js"></script>';
65
+
66
+ if( !isset( $open_flash_chart_seqno ) )
67
+ {
68
+ $open_flash_chart_seqno = 1;
69
+ $out[] = '<script type="text/javascript" src="'. $base .'js/swfobject.js"></script>';
70
+ }
71
+ else
72
+ {
73
+ $open_flash_chart_seqno++;
74
+ $obj_id .= '_'. $open_flash_chart_seqno;
75
+ $div_name .= '_'. $open_flash_chart_seqno;
76
+ }
77
+
78
+ if( $use_swfobject )
79
+ {
80
+ // Using library for auto-enabling Flash object on IE, disabled-Javascript proof
81
+ $out[] = '<div id="'. $div_name .'"></div>';
82
+ $out[] = '<script type="text/javascript">';
83
+ $out[] = 'var so = new SWFObject("'. $base .'open-flash-chart.swf", "'. $obj_id .'", "'. $width . '", "' . $height . '", "9", "#FFFFFF");';
84
+
85
+ $out[] = 'so.addVariable("data-file", "'. $url . '");';
86
+
87
+ $out[] = 'so.addParam("allowScriptAccess", "always" );//"sameDomain");';
88
+ $out[] = 'so.write("'. $div_name .'");';
89
+ $out[] = '</script>';
90
+ $out[] = '<noscript>';
91
+ }
92
+
93
+ $out[] = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' . $protocol . '://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ';
94
+ $out[] = 'width="' . $width . '" height="' . $height . '" id="ie_'. $obj_id .'" align="middle">';
95
+ $out[] = '<param name="allowScriptAccess" value="sameDomain" />';
96
+ $out[] = '<param name="movie" value="'. $base .'open-flash-chart.swf?data='. $url .'" />';
97
+ $out[] = '<param name="quality" value="high" />';
98
+ $out[] = '<param name="bgcolor" value="#FFFFFF" />';
99
+ $out[] = '<embed src="'. $base .'open-flash-chart.swf?data=' . $url .'" quality="high" bgcolor="#FFFFFF" width="'. $width .'" height="'. $height .'" name="'. $obj_id .'" align="middle" allowScriptAccess="sameDomain" ';
100
+ $out[] = 'type="application/x-shockwave-flash" pluginspage="' . $protocol . '://www.macromedia.com/go/getflashplayer" id="'. $obj_id .'"/>';
101
+ $out[] = '</object>';
102
+
103
+ if ( $use_swfobject ) {
104
+ $out[] = '</noscript>';
105
+ }
106
+
107
+ return implode("\n",$out);
108
+ }
109
+ ?>
includes/version-2-ichor/php-ofc-library/open-flash-chart.php ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // var_dump(debug_backtrace());
4
+
5
+ //
6
+ // Omar Kilani's php C extension for encoding JSON has been incorporated in stock PHP since 5.2.0
7
+ // http://www.aurore.net/projects/php-json/
8
+ //
9
+ // -- Marcus Engene
10
+ //
11
+ if (! function_exists('json_encode'))
12
+ {
13
+ include_once 'JSON.php';
14
+ }
15
+
16
+ include_once 'json_format.php';
17
+
18
+ // ofc classes
19
+ include_once 'ofc_title.php';
20
+ include_once 'ofc_y_axis_base.php';
21
+ include_once 'ofc_y_axis.php';
22
+ include_once 'ofc_y_axis_right.php';
23
+ include_once 'ofc_x_axis.php';
24
+
25
+
26
+ include_once 'ofc_pie.php';
27
+ //include_once 'ofc_bar.php';
28
+ include_once 'ofc_bar_glass.php';
29
+ include_once 'ofc_bar_filled.php';
30
+ include_once 'ofc_bar_stack.php';
31
+ //include_once 'ofc_bar_3d.php';
32
+ include_once 'ofc_hbar.php';
33
+ include_once 'ofc_line_base.php';
34
+ include_once 'ofc_line.php';
35
+ //include_once 'ofc_line_dot.php';
36
+ //include_once 'ofc_line_hollow.php';
37
+
38
+ include_once 'ofc_area_base.php';
39
+ //include_once 'ofc_area_hollow.php';
40
+ //include_once 'ofc_area_line.php';
41
+
42
+ include_once 'ofc_x_legend.php';
43
+ include_once 'ofc_y_legend.php';
44
+ include_once 'ofc_bar_sketch.php';
45
+ include_once 'ofc_scatter.php';
46
+ include_once 'ofc_scatter_line.php';
47
+ include_once 'ofc_x_axis_labels.php';
48
+ include_once 'ofc_x_axis_label.php';
49
+ include_once 'ofc_tooltip.php';
50
+ include_once 'ofc_shape.php';
51
+ include_once 'ofc_radar_axis.php';
52
+ include_once 'ofc_radar_axis_labels.php';
53
+ include_once 'ofc_radar_spoke_labels.php';
54
+ include_once 'ofc_line_style.php';
55
+
56
+ include_once 'dot_base.php';
57
+ include_once 'ofc_menu.php';
58
+
59
+ class open_flash_chart
60
+ {
61
+ function open_flash_chart()
62
+ {
63
+ //$this->title = new title( "Many data lines" );
64
+ $this->elements = array();
65
+ }
66
+
67
+ function set_title( $t )
68
+ {
69
+ $this->title = $t;
70
+ }
71
+
72
+ function set_x_axis( $x )
73
+ {
74
+ $this->x_axis = $x;
75
+ }
76
+
77
+ function set_y_axis( $y )
78
+ {
79
+ $this->y_axis = $y;
80
+ }
81
+
82
+ function add_y_axis( $y )
83
+ {
84
+ $this->y_axis = $y;
85
+ }
86
+
87
+ function set_y_axis_right( $y )
88
+ {
89
+ $this->y_axis_right = $y;
90
+ }
91
+
92
+ function add_element( $e )
93
+ {
94
+ $this->elements[] = $e;
95
+ }
96
+
97
+ function set_x_legend( $x )
98
+ {
99
+ $this->x_legend = $x;
100
+ }
101
+
102
+ function set_y_legend( $y )
103
+ {
104
+ $this->y_legend = $y;
105
+ }
106
+
107
+ function set_bg_colour( $colour )
108
+ {
109
+ $this->bg_colour = $colour;
110
+ }
111
+
112
+ function set_radar_axis( $radar )
113
+ {
114
+ $this->radar_axis = $radar;
115
+ }
116
+
117
+ function set_tooltip( $tooltip )
118
+ {
119
+ $this->tooltip = $tooltip;
120
+ }
121
+
122
+ /**
123
+ * This is a bit funky :(
124
+ *
125
+ * @param $num_decimals as integer. Truncate the decimals to $num_decimals, e.g. set it
126
+ * to 5 and 3.333333333 will display as 3.33333. 2.0 will display as 2 (or 2.00000 - see below)
127
+ * @param $is_fixed_num_decimals_forced as boolean. If true it will pad the decimals.
128
+ * @param $is_decimal_separator_comma as boolean
129
+ * @param $is_thousand_separator_disabled as boolean
130
+ *
131
+ * This needs a bit of love and attention
132
+ */
133
+ function set_number_format($num_decimals, $is_fixed_num_decimals_forced, $is_decimal_separator_comma, $is_thousand_separator_disabled )
134
+ {
135
+ $this->num_decimals = $num_decimals;
136
+ $this->is_fixed_num_decimals_forced = $is_fixed_num_decimals_forced;
137
+ $this->is_decimal_separator_comma = $is_decimal_separator_comma;
138
+ $this->is_thousand_separator_disabled = $is_thousand_separator_disabled;
139
+ }
140
+
141
+ /**
142
+ * This is experimental and will change as we make it work
143
+ *
144
+ * @param $m as ofc_menu
145
+ */
146
+ function set_menu($m)
147
+ {
148
+ $this->menu = $m;
149
+ }
150
+
151
+ function toString()
152
+ {
153
+ if (function_exists('json_encode'))
154
+ {
155
+ return json_encode($this);
156
+ }
157
+ else
158
+ {
159
+ $json = new Services_JSON();
160
+ return $json->encode( $this );
161
+ }
162
+ }
163
+
164
+ function toPrettyString()
165
+ {
166
+ return json_format( $this->toString() );
167
+ }
168
+ }
169
+
170
+
171
+
172
+ //
173
+ // there is no PHP end tag so we don't mess the headers up!
174
+ //
pretty-link.php ADDED
@@ -0,0 +1,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Pretty Link
4
+ Plugin URI: http://blairwilliams.com/pretty-link
5
+ Description: Create clean, simple, trackable links on your website that redirect to other URLs and then analyze the number of clicks and unique clicks they get per day using Pretty Link. For instance you could create this URL: http://www.yourdomain.com/cnn that could redirect to http://www.cnn.com. This type of trackable redirection is EXTREMELY useful for masking Affiliate Links. Pretty Link is a superior alternative to using TinyURL, BudURL or other link shrinking service because the URLs are coming from your website's domain name. When these links are used, pretty link not only redirects but also keeps track of their clicks, unique clicks and other data about them which can be analyzed immediately.
6
+ Version: 1.1.0
7
+ Author: Blair Williams
8
+ Author URI: http://blairwilliams.com
9
+ Copyright: 2009, Caseproof, LLC
10
+
11
+ GNU General Public License, Free Software Foundation <http://creativecommons.org/licenses/GPL/2.0/>
12
+ This program is free software; you can redistribute it and/or modify
13
+ it under the terms of the GNU General Public License as published by
14
+ the Free Software Foundation; either version 2 of the License, or
15
+ (at your option) any later version.
16
+
17
+ This program is distributed in the hope that it will be useful,
18
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
19
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
+ GNU General Public License for more details.
21
+
22
+ You should have received a copy of the GNU General Public License
23
+ along with this program; if not, write to the Free Software
24
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25
+ */
26
+
27
+ require_once('prli-config.php');
28
+ require_once(PRLI_MODELS_PATH . '/models.inc.php');
29
+
30
+ register_activation_hook(__FILE__,'prli_install');
31
+
32
+ add_action('admin_menu', 'prli_menu');
33
+
34
+ function prli_menu()
35
+ {
36
+ add_menu_page('Pretty Link', 'Pretty Link', 8, PRLI_PATH.'/prli-links.php','',PRLI_URL.'/images/pretty-link-small.png');
37
+ add_submenu_page(PRLI_PATH.'/prli-links.php', 'Pretty Link | Reports', 'Reports', 8, PRLI_PATH.'/prli-reports.php');
38
+
39
+ add_action('admin_head-pretty-link/prli-reports.php', 'prli_reports_admin_header');
40
+ }
41
+
42
+
43
+ /* Add header to prli-reports page */
44
+ function prli_reports_admin_header()
45
+ {
46
+ global $prli_report, $prli_utils;
47
+
48
+ if(isset($_POST['link']))
49
+ $link_id = $_POST['link'];
50
+ else
51
+ $link_id = "all";
52
+
53
+ if(isset($_POST['type']))
54
+ $type = $_POST['type'];
55
+ else
56
+ $type = "all";
57
+
58
+ $first_click = $prli_utils->getFirstClickDate();
59
+
60
+ // Adjust for the first click
61
+ if(isset($first_click))
62
+ {
63
+ $min_date = (int)((time()-$first_click)/60/60/24);
64
+
65
+ if(isset($_POST['sdate']) and $_POST['sdate'] != '')
66
+ {
67
+ $sdate = explode("-",$_POST['sdate']);
68
+ $start_timestamp = mktime(0,0,0,$sdate[1],$sdate[2],$sdate[0]);
69
+ }
70
+ else
71
+ {
72
+ // Default to min_date or 30 days ago
73
+ if($min_date < 30)
74
+ $start_timestamp = time()-60*60*24*(int)$min_date;
75
+ else
76
+ $start_timestamp = time()-60*60*24*30;
77
+ }
78
+
79
+ if(isset($_POST['edate']) and $_POST['edate'] != '')
80
+ {
81
+ $edate = explode("-",$_POST['edate']);
82
+ $end_timestamp = mktime(0,0,0,$edate[1],$edate[2],$edate[0]);
83
+ }
84
+ else
85
+ {
86
+ $end_timestamp = time();
87
+ }
88
+ }
89
+ else
90
+ {
91
+ $min_date = 0;
92
+ $start_timestamp = time();
93
+ $end_timestamp = time();
94
+ }
95
+ ?>
96
+ <link type="text/css" href="/wp-content/plugins/<?php echo PRLI_PLUGIN_NAME; ?>/includes/jquery/css/ui-lightness/jquery-ui-1.7.1.custom.css" rel="stylesheet" />
97
+ <script type="text/javascript" src="/wp-content/plugins/<?php echo PRLI_PLUGIN_NAME; ?>/includes/jquery/js/jquery-1.3.2.min.js"></script>
98
+ <script type="text/javascript" src="/wp-content/plugins/<?php echo PRLI_PLUGIN_NAME; ?>/includes/jquery/js/jquery-ui-1.7.1.custom.min.js"></script>
99
+
100
+ <script type="text/javascript">
101
+ $(document).ready(function(){
102
+ $("#sdate").datepicker({ dateFormat: 'yy-mm-dd', defaultDate: -30, minDate: -<?php echo $min_date; ?>, maxDate: 0 });
103
+ $("#edate").datepicker({ dateFormat: 'yy-mm-dd', minDate: -<?php echo $min_date; ?>, maxDate: 0 });
104
+ });
105
+ </script>
106
+ <script type="text/javascript" src="/wp-content/plugins/<?php echo PRLI_PLUGIN_NAME; ?>/includes/version-2-ichor/js/json/json2.js"></script>
107
+ <script type="text/javascript" src="/wp-content/plugins/<?php echo PRLI_PLUGIN_NAME; ?>/includes/version-2-ichor/js/swfobject.js"></script>
108
+ <script type="text/javascript">
109
+ var params = {};
110
+ params.wmode = "transparent";
111
+
112
+ swfobject.embedSWF("/wp-content/plugins/<?php echo PRLI_PLUGIN_NAME; ?>/includes/version-2-ichor/open-flash-chart.swf", "my_chart", "100%", "400", "9.0.0","expressInstall.swf", params);
113
+ </script>
114
+
115
+ <script type="text/javascript">
116
+ $(document).ready(function(){
117
+ $("#sdate").datepicker();
118
+ $("#edate").datepicker();
119
+ });
120
+ </script>
121
+
122
+
123
+ <script type="text/javascript">
124
+
125
+ function ofc_ready()
126
+ {
127
+ //alert('ofc_ready');
128
+ }
129
+
130
+ function open_flash_chart_data()
131
+ {
132
+ //alert( 'reading data' );
133
+ return JSON.stringify(data);
134
+ }
135
+
136
+ function findSWF(movieName) {
137
+ if (navigator.appName.indexOf("Microsoft")!= -1) {
138
+ return window[movieName];
139
+ } else {
140
+ return document[movieName];
141
+ }
142
+ }
143
+
144
+ OFC = {};
145
+
146
+ OFC.jquery = {
147
+ name: "jQuery",
148
+ version: function(src) { return $('#'+ src)[0].get_version() },
149
+ rasterize: function (src, dst) { $('#'+ dst).replaceWith(OFC.jquery.image(src)) },
150
+ image: function(src) { return "<img src='data:image/png;base64," + $('#'+src)[0].get_img_binary() + "' />"},
151
+ popup: function(src) {
152
+ var img_win = window.open('', 'Charts: Export as Image')
153
+ with(img_win.document) {
154
+ write('<html><head><title>Charts: Export as Image<\/title><\/head><body>' + OFC.jquery.image(src) + '<div>Right-Click on the above Image to Save<\/div><\/body><\/html>') }
155
+ // stop the 'loading...' message
156
+ img_win.document.close();
157
+ }
158
+ }
159
+
160
+ // Using an object as namespaces is JS Best Practice. I like the Control.XXX style.
161
+ //if (!Control) {var Control = {}}
162
+ //if (typeof(Control == "undefined")) {var Control = {}}
163
+ if (typeof(Control == "undefined")) {var Control = {OFC: OFC.jquery}}
164
+
165
+
166
+ // By default, right-clicking on OFC and choosing "save image locally" calls this function.
167
+ // You are free to change the code in OFC and call my wrapper (Control.OFC.your_favorite_save_method)
168
+ // function save_image() { alert(1); Control.OFC.popup('my_chart') }
169
+ function save_image() {
170
+ //alert(1);
171
+ OFC.jquery.popup('my_chart')
172
+ }
173
+
174
+ function moo() {
175
+ //alert(99);
176
+ };
177
+
178
+ var data = <?php echo $prli_report->setupClickReport($start_timestamp,$end_timestamp,$link_id,$type); ?>;
179
+
180
+ </script>
181
+
182
+ <?php
183
+ }
184
+
185
+ /********* ADD REDIRECTS YO ***********/
186
+ function link_rewrite($wp_rewrite) {
187
+ global $prli_link, $prli_utils;
188
+
189
+ $pretty_links = $prli_link->getAll();
190
+
191
+ foreach($pretty_links as $pl)
192
+ {
193
+ if( $pl->slug != null and $pl->slug != '' and $prli_utils->slugIsAvailable($pl->slug) )
194
+ {
195
+ add_rewrite_rule('(' . $pl->slug . ')/?$', 'wp-content/plugins/' . PRLI_PLUGIN_NAME . '/prli.php?s=$1');
196
+ }
197
+
198
+ }
199
+ }
200
+
201
+ // Add rules after the rest of the rules are run
202
+ add_filter('generate_rewrite_rules', 'link_rewrite');
203
+
204
+ /********* INSTALL PLUGIN ***********/
205
+ $prli_db_version = "0.0.3";
206
+
207
+ function prli_install() {
208
+ global $wpdb;
209
+ global $prli_db_version;
210
+
211
+
212
+ $clicks_table = $wpdb->prefix . "prli_clicks";
213
+ $pretty_links_table = $wpdb->prefix . "prli_links";
214
+
215
+ $prli_db_version = 'prli_db_version';
216
+ $prli_current_db_version = get_option( $prli_db_version );
217
+
218
+ if( empty($prli_current_db_version) or ($prli_current_db_version != $prli_new_db_version))
219
+ {
220
+ /* Create/Upgrade Clicks Table */
221
+ $sql = "CREATE TABLE " . $clicks_table . " (
222
+ id int(11) NOT NULL auto_increment,
223
+ ip varchar(255) default NULL,
224
+ browser varchar(255) default NULL,
225
+ first_click tinyint default 0,
226
+ created_at datetime NOT NULL,
227
+ link_id int(11) default NULL,
228
+ PRIMARY KEY (id),
229
+ KEY link_id (link_id),
230
+ CONSTRAINT ".$clicks_table."_ibfk_1 FOREIGN KEY (link_id) REFERENCES $pretty_links_table (link_id)
231
+ );";
232
+
233
+ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
234
+
235
+ dbDelta($sql);
236
+
237
+ /* Create/Upgrade Pretty Links Table */
238
+ $sql = "CREATE TABLE " . $pretty_links_table . " (
239
+ id int(11) NOT NULL auto_increment,
240
+ url varchar(255) default NULL,
241
+ slug varchar(255) default NULL,
242
+ created_at datetime NOT NULL,
243
+ PRIMARY KEY (id),
244
+ KEY slug (slug)
245
+ );";
246
+
247
+ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
248
+
249
+ dbDelta($sql);
250
+ }
251
+ }
252
+ ?>
prli-config.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ define(PRLI_PLUGIN_NAME,"pretty-link");
3
+ define(PRLI_PATH,WP_PLUGIN_DIR.'/'.PRLI_PLUGIN_NAME);
4
+ define(PRLI_MODELS_PATH,PRLI_PATH.'/classes/models');
5
+ define(PRLI_VIEWS_PATH,PRLI_PATH.'/classes/views');
6
+ define(PRLI_URL,WP_PLUGIN_URL.'/'.PRLI_PLUGIN_NAME);
7
+
8
+ // The number of items per page on a table
9
+ $page_size = 15;
10
+ ?>
prli-links.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once 'prli-config.php';
3
+ require_once(PRLI_MODELS_PATH . '/models.inc.php');
4
+
5
+ $controller_file = 'prli-links.php';
6
+
7
+ if($_GET['action'] == null and $_POST['action'] == null)
8
+ {
9
+ // Required for Pagination to work
10
+ if($_GET['paged'] != null)
11
+ {
12
+ $current_page = $_GET['paged'];
13
+ }
14
+ else
15
+ {
16
+ $current_page = 1;
17
+ }
18
+
19
+ $record_count = $prli_link->getRecordCount();
20
+ $page_count = $prli_link->getPageCount($page_size);
21
+ $links = $prli_link->getPage($current_page,$page_size);
22
+ $page_last_record = $prli_utils->getLastRecordNum($record_count,$current_page,$page_size);
23
+ $page_first_record = $prli_utils->getFirstRecordNum($record_count,$current_page,$page_size);
24
+ $page_params = "";
25
+ require_once 'classes/views/prli-links/list.php';
26
+ }
27
+ else if($_GET['action'] == 'new' or $_POST['action'] == 'new')
28
+ {
29
+ require_once 'classes/views/prli-links/new.php';
30
+ }
31
+ else if($_GET['action'] == 'create' or $_POST['action'] == 'create')
32
+ {
33
+ $errors = $prli_link->validate($_POST);
34
+ if( count($errors) > 0 )
35
+ {
36
+ require_once 'classes/views/prli-links/new.php';
37
+ }
38
+ else
39
+ {
40
+ $record = $prli_link->create( $_POST );
41
+
42
+ // Required for Pagination to work
43
+ $current_page = 1;
44
+ $record_count = $prli_link->getRecordCount();
45
+ $page_count = $prli_link->getPageCount($page_size);
46
+ $links = $prli_link->getPage($current_page,$page_size);
47
+ $page_last_record = $prli_utils->getLastRecordNum($record_count,$current_page,$page_size);
48
+ $page_first_record = $prli_utils->getFirstRecordNum($record_count,$current_page,$page_size);
49
+ $page_params = "";
50
+
51
+ require_once 'classes/views/prli-links/list.php';
52
+ }
53
+ }
54
+ else if($_GET['action'] == 'edit' or $_POST['action'] == 'edit')
55
+ {
56
+ $record = $prli_link->getOne( $_GET['id'] );
57
+ $id = $_GET['id'];
58
+ require_once 'classes/views/prli-links/edit.php';
59
+ }
60
+ else if($_GET['action'] == 'update' or $_POST['action'] == 'update')
61
+ {
62
+ $errors = $prli_link->validate($_POST);
63
+ $id = $_POST['id'];
64
+ if( count($errors) > 0 )
65
+ {
66
+ require_once 'classes/views/prli-links/edit.php';
67
+ }
68
+ else
69
+ {
70
+ $record = $prli_link->update( $_POST['id'], $_POST );
71
+
72
+ // Required for Pagination to work
73
+ $current_page = 1;
74
+ $record_count = $prli_link->getRecordCount();
75
+ $page_count = $prli_link->getPageCount($page_size);
76
+ $links = $prli_link->getPage($current_page,$page_size);
77
+ $page_last_record = $prli_utils->getLastRecordNum($record_count,$current_page,$page_size);
78
+ $page_first_record = $prli_utils->getFirstRecordNum($record_count,$current_page,$page_size);
79
+ $page_params = "";
80
+
81
+ require_once 'classes/views/prli-links/list.php';
82
+ }
83
+ }
84
+ else if($_GET['action'] == 'destroy')
85
+ {
86
+ $prli_link->destroy( $_GET['id'] );
87
+
88
+ // Required for Pagination to work
89
+ $current_page = 1;
90
+ $record_count = $prli_link->getRecordCount();
91
+ $page_count = $prli_link->getPageCount($page_size);
92
+ $links = $prli_link->getPage($current_page,$page_size);
93
+ $page_last_record = $prli_utils->getLastRecordNum($record_count,$current_page,$page_size);
94
+ $page_first_record = $prli_utils->getFirstRecordNum($record_count,$current_page,$page_size);
95
+ $page_params = "";
96
+ require_once 'classes/views/prli-links/list.php';
97
+ }
98
+ ?>
prli-reports.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once 'prli-config.php';
3
+ require_once(PRLI_MODELS_PATH . '/models.inc.php');
4
+
5
+ $controller_file = 'prli-links.php';
6
+
7
+ require_once 'classes/views/prli-reports/form.php';
8
+ ?>
9
+
prli.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* This file tracks clicks */
3
+
4
+ require_once(dirname(__FILE__) . '/../../../wp-config.php');
5
+
6
+ if( $_GET['s'] != null and $_GET['s'] != '' )
7
+ {
8
+ $slug = $_GET['s'];
9
+
10
+ $click_table = $wpdb->prefix . "prli_clicks";
11
+ $pretty_links_table = $wpdb->prefix . "prli_links";
12
+
13
+ $query = "SELECT id,url FROM $pretty_links_table WHERE slug='$slug' LIMIT 1";
14
+ $pretty_link = $wpdb->get_row($query);
15
+
16
+ $first_click = false;
17
+
18
+ $click_ip = $_SERVER['REMOTE_ADDR'];
19
+ $click_browser = $_SERVER['HTTP_USER_AGENT'];
20
+
21
+ //Set Cookie if it doesn't exist
22
+ $cookie_name = 'prli_click_' . $pretty_link->id;
23
+ $cookie_expire_time = time()+60*60*24*30; // Expire in 30 days
24
+
25
+ if($_COOKIE[$cookie_name] == null)
26
+ {
27
+ setcookie($cookie_name,$slug,$cookie_expire_time);
28
+ $first_click = true;
29
+ }
30
+
31
+ //Record Click in DB
32
+ $insert = "INSERT INTO $click_table (link_id,ip,browser,first_click,created_at) VALUES ($pretty_link->id,'$click_ip','$click_browser','$first_click',NOW())";
33
+
34
+ $results = $wpdb->query( $insert );
35
+
36
+ //Redirect to Product URL
37
+ header("Location: $pretty_link->url");
38
+ }
39
+ ?>
readme.txt ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Pretty Link ===
2
+ Contributors: supercleanse
3
+ Donate link: http://blairwilliams.com/pretty-link
4
+ Tags: links, link, url, urls, affiliate, affiliates, pretty, marketing, redirect, redirect, rewrite, short, shorten, click, clicks, track, tracking, tiny, tinyurl, budurl, shrinking, domain, shrink, mask, masking, slug, slugs, admin, stats, statistics, stat, statistic
5
+ Requires at least: 2.7.1
6
+ Tested up to: 2.7.1
7
+ Stable tag: 1.1.0
8
+
9
+ Create clean, simple, trackable links on your website that redirect to other URLs and then analyze the number of clicks and unique clicks they get per day using Pretty Link. For instance you could create this URL: http://www.yourdomain.com/cnn that could redirect to http://www.cnn.com. This type of trackable redirection is EXTREMELY useful for masking Affiliate Links. Pretty Link is a superior alternative to using TinyURL, BudURL or other link shrinking service because the URLs are coming from your website's domain name. When these links are used, pretty link not only redirects but also keeps track of their clicks, unique clicks and other data about them which can be analyzed immediately.
10
+
11
+ == Description ==
12
+
13
+ Create clean, simple, trackable links on your website that redirect to other URLs and then analyze the number of clicks and unique clicks they get per day using Pretty Link. For instance you could create this URL: http://www.yourdomain.com/cnn that could redirect to http://www.cnn.com. This type of trackable redirection is EXTREMELY useful for masking Affiliate Links. Pretty Link is a superior alternative to using TinyURL, BudURL or other link shrinking service because the URLs are coming from your website's domain name. When these links are used, pretty link not only redirects but also keeps track of their clicks, unique clicks and other data about them which can be analyzed immediately.
14
+
15
+ = Features =
16
+
17
+ * Gives you the ability to create clean, simple URLs on your website that redirect to any other URL
18
+ * Generates random 2-3 character slugs for your URL or allows you to name a custom slug for your URL
19
+ * Tracks the Number of Clicks per link
20
+ * Tracks the Number of Unique Clicks per link
21
+ * Provides a reporting interface where you can see a configurable chart of clicks per day. This report can be filtered by the specific link clicked, date range, and/or unique clicks.
22
+
23
+ == Installation ==
24
+
25
+ 1. Upload 'pretty-link.zip' to the '/wp-content/plugins/' directory
26
+
27
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
28
+
29
+ 3. Make sure you have changed your permalink Common Settings in Settings -> Permalinks away from "Default" to something else. I prefer using custom and then "/%postname%/" for the simplest possible URL slugs.
30
+
31
+ == Frequently Asked Questions ==
32
+
33
+ * This plugin is extremely simple. All you have to do is to find the pretty link admin menu (bottom left of your admin page) and start by clicking "Add a Pretty Link."
34
+
35
+ = NOTE: =
36
+
37
+ You must have pretty permalinks and rewrite working in your Wordpress/PHP/Apache install before pretty links will work (this is already done in most cases but if you can't get anything but Default permalinks working then you may need to contact your system administrator). Pretty links utlilzes Wordpress's URL rewriting capabilities (via Apache's mod_rewrite) which are only turned on when you change the settings in "Settings -> Permalinks" from "Default" to something else. If you want your blog to have any kind of decent SEO then you really should do this anyway.
38
+
39
+
40
+ == Screenshots ==
41
+
42
+ 1. Link Management Screen
43
+ 2. Add a Link Screen
44
+ 3. Edit a Link Screen
45
+ 4. Analyze Click Data
screenshot-1.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
screenshot-3.png ADDED
Binary file
screenshot-4.png ADDED
Binary file