<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Devin's Knowledge Blog</title>
	<atom:link href="http://blog.devinberry.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.devinberry.net</link>
	<description>Code help and examples, Tech articles mostly on Open Source Tech</description>
	<lastBuildDate>Fri, 31 Jul 2009 06:08:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Remove Duplicates from MySQL table</title>
		<link>http://blog.devinberry.net/?p=321</link>
		<comments>http://blog.devinberry.net/?p=321#comments</comments>
		<pubDate>Fri, 31 Jul 2009 06:07:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://blog.devinberry.net/?p=321</guid>
		<description><![CDATA[Ever had to remove duplicate entries in a table because some GENUIS thought that it would be good design to not put a unique index on a field or better yet was too lazy to put in the proper checking to make sure that you are not inserting duplicates ? Well here is something to [...]]]></description>
			<content:encoded><![CDATA[<p>Ever had to remove duplicate entries in a table because some GENUIS thought that it would be good design to not put a unique index on a field or better yet was too lazy to put in the proper checking to make sure that you are not inserting duplicates ? Well here is something to correct that sloppy laziness&#8230;..There are four steps to get this resolved.</p>
<p>
<strong>Step 1. Make a backup of the table you are about to change in the event everything breaks.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;">mysqldump <span style="color: #CC0099;">--</span>add<span style="color: #CC0099;">-</span>drop<span style="color: #CC0099;">-</span><span style="color: #990099; font-weight: bold;">table</span> <span style="color: #CC0099;">-</span>h db01.example.net <span style="color: #CC0099;">-</span>u dbocodex <span style="color: #CC0099;">-</span>p dbwp <span style="color: #CC0099;">|</span> bzip2 <span style="color: #CC0099;">-</span>c <span style="color: #CC0099;">&gt;</span> blog.bak.sql.bz2</pre></div></div>

<p>
<strong>Step 2. Move the non duplicates (unique tables) into a temporary table</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span> new_table <span style="color: #990099; font-weight: bold;">AS</span>
<span style="color: #990099; font-weight: bold;">SELECT</span> <span style="color: #CC0099;">*</span> <span style="color: #990099; font-weight: bold;">FROM</span> old_table <span style="color: #990099; font-weight: bold;">WHERE</span> <span style="color: #008080;">1</span> <span style="color: #990099; font-weight: bold;">GROUP BY</span> <span style="color: #FF00FF;">&#91;</span><span style="color: #990099; font-weight: bold;">COLUMN</span> <span style="color: #990099; font-weight: bold;">TO</span> remove duplicates BY<span style="color: #FF00FF;">&#93;</span><span style="color: #000033;">;</span></pre></div></div>

<p>
<strong>Step 3. Delete the old table</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">DROP</span> <span style="color: #990099; font-weight: bold;">TABLE</span> old_table<span style="color: #000033;">;</span></pre></div></div>

<p>
<strong>Step 4. Rename the new_table to the name of the old_table</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">RENAME</span> <span style="color: #990099; font-weight: bold;">TABLE</span> new_table <span style="color: #990099; font-weight: bold;">TO</span> old_table<span style="color: #000033;">;</span></pre></div></div>

<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.devinberry.net%2F%3Fp%3D321&amp;linkname=Remove%20Duplicates%20from%20MySQL%20table"><img src="http://blog.devinberry.net/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.devinberry.net/?feed=rss2&amp;p=321</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sajax &#8211; PHP and AJAX</title>
		<link>http://blog.devinberry.net/?p=294</link>
		<comments>http://blog.devinberry.net/?p=294#comments</comments>
		<pubDate>Thu, 19 Feb 2009 07:35:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Programming]]></category>

		<guid isPermaLink="false">http://blog.devinberry.net/?p=294</guid>
		<description><![CDATA[Sajax is an open source tool to make programming websites using the Ajax framework — also known as XMLHTTPRequest or remote scripting — as easy as possible. Sajax makes it easy to call PHP, Perl or Python functions from your webpages via JavaScript without performing a browser refresh. The toolkit does 99% of the work [...]]]></description>
			<content:encoded><![CDATA[<p>Sajax is an open source tool to make programming websites using the Ajax framework — also known as XMLHTTPRequest or remote scripting — as easy as possible. Sajax makes it easy to call PHP, Perl or Python functions from your webpages via JavaScript without performing a browser refresh. The toolkit does 99% of the work for you so you have no excuse to not use it.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>	
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$SAJAX_INCLUDED</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/*  
	 * GLOBALS AND DEFAULTS
	 *
	 */</span> 
	<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sajax_version'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'0.12'</span><span style="color: #339933;">;</span>	
	<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sajax_debug_mode'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sajax_export_list'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sajax_request_type'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'GET'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sajax_remote_uri'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$GLOBALS</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'sajax_failure_redirect'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">/*
	 * CODE
	 *
	 */</span> 
&nbsp;
	<span style="color: #666666; font-style: italic;">//</span>
	<span style="color: #666666; font-style: italic;">// Initialize the Sajax library.</span>
	<span style="color: #666666; font-style: italic;">//</span>
	<span style="color: #000000; font-weight: bold;">function</span> sajax_init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//</span>
	<span style="color: #666666; font-style: italic;">// Helper function to return the script's own URI. </span>
	<span style="color: #666666; font-style: italic;">// </span>
	<span style="color: #000000; font-weight: bold;">function</span> sajax_get_my_uri<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;REQUEST_URI&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000088;">$sajax_remote_uri</span> <span style="color: #339933;">=</span> sajax_get_my_uri<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//</span>
	<span style="color: #666666; font-style: italic;">// Helper function to return an eval()-usable representation</span>
	<span style="color: #666666; font-style: italic;">// of an object in JavaScript.</span>
	<span style="color: #666666; font-style: italic;">// </span>
	<span style="color: #000000; font-weight: bold;">function</span> sajax_get_js_repr<span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$type</span> <span style="color: #339933;">=</span> <span style="color: #990000;">gettype</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$type</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;boolean&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">&quot;Boolean(true)&quot;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;Boolean(false)&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> 
		<span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$type</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;integer&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;parseInt(<span style="color: #006699; font-weight: bold;">$value</span>)&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> 
		<span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$type</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;double&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;parseFloat(<span style="color: #006699; font-weight: bold;">$value</span>)&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> 
		<span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$type</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;array&quot;</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$type</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;object&quot;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">//</span>
			<span style="color: #666666; font-style: italic;">// XXX Arrays with non-numeric indices are not</span>
			<span style="color: #666666; font-style: italic;">// permitted according to ECMAScript, yet everyone</span>
			<span style="color: #666666; font-style: italic;">// uses them.. We'll use an object.</span>
			<span style="color: #666666; font-style: italic;">// </span>
			<span style="color: #000088;">$s</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;{ &quot;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$type</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;object&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$value</span> <span style="color: #339933;">=</span> <span style="color: #990000;">get_object_vars</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span> 
			<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$k</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$v</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$esc_key</span> <span style="color: #339933;">=</span> sajax_esc<span style="color: #009900;">&#40;</span><span style="color: #000088;">$k</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_numeric</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$k</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
					<span style="color: #000088;">$s</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$k</span>: &quot;</span> <span style="color: #339933;">.</span> sajax_get_js_repr<span style="color: #009900;">&#40;</span><span style="color: #000088;">$v</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;, &quot;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">else</span>
					<span style="color: #000088;">$s</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span><span style="color: #006699; font-weight: bold;">$esc_key</span><span style="color: #000099; font-weight: bold;">\&quot;</span>: &quot;</span> <span style="color: #339933;">.</span> sajax_get_js_repr<span style="color: #009900;">&#40;</span><span style="color: #000088;">$v</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;, &quot;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
				<span style="color: #000088;">$s</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$s</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$s</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; }&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> 
		<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$esc_val</span> <span style="color: #339933;">=</span> sajax_esc<span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$s</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;'<span style="color: #006699; font-weight: bold;">$esc_val</span>'&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$s</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> sajax_handle_client_request<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$sajax_export_list</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$mode</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;rs&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
			<span style="color: #000088;">$mode</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;get&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;rs&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
			<span style="color: #000088;">$mode</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;post&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mode</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
			<span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$target</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$mode</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;get&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">// Bust cache in the head</span>
			<span style="color: #990000;">header</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Expires: Mon, 26 Jul 1997 05:00:00 GMT&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;">// Date in the past</span>
			<span style="color: #990000;">header</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Last-Modified: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">gmdate</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;D, d M Y H:i:s&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot; GMT&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #666666; font-style: italic;">// always modified</span>
			<span style="color: #990000;">header</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Cache-Control: no-cache, must-revalidate&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// HTTP/1.1</span>
			<span style="color: #990000;">header</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Pragma: no-cache&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>                          <span style="color: #666666; font-style: italic;">// HTTP/1.0</span>
			<span style="color: #000088;">$func_name</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;rs&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;rsargs&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
				<span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;rsargs&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">else</span>
				<span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$func_name</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;rs&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span> <span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;rsargs&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
				<span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;rsargs&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">else</span>
				<span style="color: #000088;">$args</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span> <span style="color: #990000;">in_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$func_name</span><span style="color: #339933;">,</span> <span style="color: #000088;">$sajax_export_list</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;-:<span style="color: #006699; font-weight: bold;">$func_name</span> not callable&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;+:&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">call_user_func_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$func_name</span><span style="color: #339933;">,</span> <span style="color: #000088;">$args</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;var res = &quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span>sajax_get_js_repr<span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;; res;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> sajax_get_common_js<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$sajax_debug_mode</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$sajax_request_type</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$sajax_remote_uri</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$sajax_failure_redirect</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$t</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strtoupper</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sajax_request_type</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$t</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$t</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;GET&quot;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$t</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;POST&quot;</span><span style="color: #009900;">&#41;</span> 
			<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;// Invalid type: <span style="color: #006699; font-weight: bold;">$t</span>.. <span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #990000;">ob_start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">		<span style="color: #006600; font-style: italic;">// remote scripting library</span>
		<span style="color: #006600; font-style: italic;">// (c) copyright 2005 modernmethod, inc</span>
		<span style="color: #003366; font-weight: bold;">var</span> sajax_debug_mode <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;?php echo $sajax_debug_mode ? &quot;</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #3366CC;">&quot; : &quot;</span><span style="color: #003366; font-weight: bold;">false</span><span style="color: #3366CC;">&quot;; ?&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> sajax_request_type <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;?php echo $t; ?&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> sajax_target_id <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #003366; font-weight: bold;">var</span> sajax_failure_redirect <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;?php echo $sajax_failure_redirect; ?&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">function</span> sajax_debug<span style="color: #009900;">&#40;</span>text<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>sajax_debug_mode<span style="color: #009900;">&#41;</span>
				<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>text<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
 		<span style="color: #003366; font-weight: bold;">function</span> sajax_init_object<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 			sajax_debug<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;sajax_init_object() called..&quot;</span><span style="color: #009900;">&#41;</span>
&nbsp;
 			<span style="color: #003366; font-weight: bold;">var</span> A<span style="color: #339933;">;</span>
&nbsp;
 			<span style="color: #003366; font-weight: bold;">var</span> msxmlhttp <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span>
				<span style="color: #3366CC;">'Msxml2.XMLHTTP.5.0'</span><span style="color: #339933;">,</span>
				<span style="color: #3366CC;">'Msxml2.XMLHTTP.4.0'</span><span style="color: #339933;">,</span>
				<span style="color: #3366CC;">'Msxml2.XMLHTTP.3.0'</span><span style="color: #339933;">,</span>
				<span style="color: #3366CC;">'Msxml2.XMLHTTP'</span><span style="color: #339933;">,</span>
				<span style="color: #3366CC;">'Microsoft.XMLHTTP'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> msxmlhttp.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
					A <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> ActiveXObject<span style="color: #009900;">&#40;</span>msxmlhttp<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					A <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>A <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000066; font-weight: bold;">typeof</span> XMLHttpRequest <span style="color: #339933;">!=</span> <span style="color: #3366CC;">&quot;undefined&quot;</span><span style="color: #009900;">&#41;</span>
				A <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> XMLHttpRequest<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>A<span style="color: #009900;">&#41;</span>
				sajax_debug<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Could not create connection object.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">return</span> A<span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">var</span> sajax_requests <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">function</span> sajax_cancel<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> sajax_requests.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> 
				sajax_requests<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">abort</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #003366; font-weight: bold;">function</span> sajax_do_call<span style="color: #009900;">&#40;</span>func_name<span style="color: #339933;">,</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">,</span> x<span style="color: #339933;">,</span> n<span style="color: #339933;">;</span>
			<span style="color: #003366; font-weight: bold;">var</span> uri<span style="color: #339933;">;</span>
			<span style="color: #003366; font-weight: bold;">var</span> post_data<span style="color: #339933;">;</span>
			<span style="color: #003366; font-weight: bold;">var</span> target_id<span style="color: #339933;">;</span>
&nbsp;
			sajax_debug<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;in sajax_do_call()..&quot;</span> <span style="color: #339933;">+</span> sajax_request_type <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;/&quot;</span> <span style="color: #339933;">+</span> sajax_target_id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			target_id <span style="color: #339933;">=</span> sajax_target_id<span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span><span style="color: #009900;">&#40;</span>sajax_request_type<span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;undefined&quot;</span> <span style="color: #339933;">||</span> sajax_request_type <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> 
				sajax_request_type <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #339933;">;</span>
&nbsp;
			uri <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;?php echo $sajax_remote_uri; ?&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>sajax_request_type <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;GET&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
				<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>uri.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;?&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> 
					uri <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;?rs=&quot;</span> <span style="color: #339933;">+</span> escape<span style="color: #009900;">&#40;</span>func_name<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000066; font-weight: bold;">else</span>
					uri <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&amp;rs=&quot;</span> <span style="color: #339933;">+</span> escape<span style="color: #009900;">&#40;</span>func_name<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				uri <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&amp;rst=&quot;</span> <span style="color: #339933;">+</span> escape<span style="color: #009900;">&#40;</span>sajax_target_id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				uri <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&amp;rsrnd=&quot;</span> <span style="color: #339933;">+</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> args.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> 
					uri <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&amp;rsargs[]=&quot;</span> <span style="color: #339933;">+</span> escape<span style="color: #009900;">&#40;</span>args<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
				post_data <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span> 
			<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>sajax_request_type <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;POST&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				post_data <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;rs=&quot;</span> <span style="color: #339933;">+</span> escape<span style="color: #009900;">&#40;</span>func_name<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				post_data <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&amp;rst=&quot;</span> <span style="color: #339933;">+</span> escape<span style="color: #009900;">&#40;</span>sajax_target_id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				post_data <span style="color: #339933;">+=</span> <span style="color: #3366CC;">&quot;&amp;rsrnd=&quot;</span> <span style="color: #339933;">+</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">getTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> args.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> 
					post_data <span style="color: #339933;">=</span> post_data <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&amp;rsargs[]=&quot;</span> <span style="color: #339933;">+</span> escape<span style="color: #009900;">&#40;</span>args<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
			<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Illegal request type: &quot;</span> <span style="color: #339933;">+</span> sajax_request_type<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
			x <span style="color: #339933;">=</span> sajax_init_object<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>x <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>sajax_failure_redirect <span style="color: #339933;">!=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					location.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> sajax_failure_redirect<span style="color: #339933;">;</span>
					<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
					sajax_debug<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;NULL sajax object for user agent:<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">+</span> navigator.<span style="color: #660066;">userAgent</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
				x.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span>sajax_request_type<span style="color: #339933;">,</span> uri<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #006600; font-style: italic;">// window.open(uri);</span>
&nbsp;
				sajax_requests<span style="color: #009900;">&#91;</span>sajax_requests.<span style="color: #660066;">length</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> x<span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>sajax_request_type <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;POST&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					x.<span style="color: #660066;">setRequestHeader</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Method&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;POST &quot;</span> <span style="color: #339933;">+</span> uri <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; HTTP/1.1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					x.<span style="color: #660066;">setRequestHeader</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Content-Type&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;application/x-www-form-urlencoded&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
&nbsp;
				x.<span style="color: #660066;">onreadystatechange</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>x.<span style="color: #660066;">readyState</span> <span style="color: #339933;">!=</span> <span style="color: #CC0000;">4</span><span style="color: #009900;">&#41;</span> 
						<span style="color: #000066; font-weight: bold;">return</span><span style="color: #339933;">;</span>
&nbsp;
					sajax_debug<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;received &quot;</span> <span style="color: #339933;">+</span> x.<span style="color: #660066;">responseText</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #003366; font-weight: bold;">var</span> <span style="color: #000066;">status</span><span style="color: #339933;">;</span>
					<span style="color: #003366; font-weight: bold;">var</span> data<span style="color: #339933;">;</span>
					<span style="color: #003366; font-weight: bold;">var</span> txt <span style="color: #339933;">=</span> x.<span style="color: #660066;">responseText</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^\s*|\s*$/g</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #000066;">status</span> <span style="color: #339933;">=</span> txt.<span style="color: #660066;">charAt</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					data <span style="color: #339933;">=</span> txt.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
					<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">status</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
						<span style="color: #006600; font-style: italic;">// let's just assume this is a pre-response bailout and let it slide for now</span>
					<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">status</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;-&quot;</span><span style="color: #009900;">&#41;</span> 
						<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Error: &quot;</span> <span style="color: #339933;">+</span> data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
						<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>target_id <span style="color: #339933;">!=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> 
							document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span>target_id<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">eval</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
						<span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
							<span style="color: #000066; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
								<span style="color: #003366; font-weight: bold;">var</span> callback<span style="color: #339933;">;</span>
								<span style="color: #003366; font-weight: bold;">var</span> extra_data <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
								<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> args<span style="color: #009900;">&#91;</span>args.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">&quot;object&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
									callback <span style="color: #339933;">=</span> args<span style="color: #009900;">&#91;</span>args.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">callback</span><span style="color: #339933;">;</span>
									extra_data <span style="color: #339933;">=</span> args<span style="color: #009900;">&#91;</span>args.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">extra_data</span><span style="color: #339933;">;</span>
								<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
									callback <span style="color: #339933;">=</span> args<span style="color: #009900;">&#91;</span>args.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
								<span style="color: #009900;">&#125;</span>
								callback<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">eval</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> extra_data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
							<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
								sajax_debug<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Caught error &quot;</span> <span style="color: #339933;">+</span> e <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;: Could not eval &quot;</span> <span style="color: #339933;">+</span> data <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
							<span style="color: #009900;">&#125;</span>
						<span style="color: #009900;">&#125;</span>
					<span style="color: #009900;">&#125;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
			sajax_debug<span style="color: #009900;">&#40;</span>func_name <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; uri = &quot;</span> <span style="color: #339933;">+</span> uri <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;/post = &quot;</span> <span style="color: #339933;">+</span> post_data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			x.<span style="color: #660066;">send</span><span style="color: #009900;">&#40;</span>post_data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			sajax_debug<span style="color: #009900;">&#40;</span>func_name <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; waiting..&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">delete</span> x<span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">		<span style="color: #000000; font-weight: bold;">&lt;?php</span>
		<span style="color: #000088;">$html</span> <span style="color: #339933;">=</span> <span style="color: #990000;">ob_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">ob_end_clean</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$html</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> sajax_show_common_js<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> sajax_get_common_js<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// javascript escape a value</span>
	<span style="color: #000000; font-weight: bold;">function</span> sajax_esc<span style="color: #009900;">&#40;</span><span style="color: #000088;">$val</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$val</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\\</span><span style="color: #000099; font-weight: bold;">\\</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$val</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$val</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\r</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>r&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$val</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$val</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>n&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$val</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$val</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>'&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$val</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&quot;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'\\&quot;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$val</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> sajax_get_one_stub<span style="color: #009900;">&#40;</span><span style="color: #000088;">$func_name</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #990000;">ob_start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
		<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
		// wrapper for <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$func_name</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;
		function x_<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$func_name</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>() {
			sajax_do_call(&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$func_name</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;,
				x_<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$func_name</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>.arguments);
		}
&nbsp;
		<span style="color: #000000; font-weight: bold;">&lt;?php</span>
		<span style="color: #000088;">$html</span> <span style="color: #339933;">=</span> <span style="color: #990000;">ob_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">ob_end_clean</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$html</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> sajax_show_one_stub<span style="color: #009900;">&#40;</span><span style="color: #000088;">$func_name</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> sajax_get_one_stub<span style="color: #009900;">&#40;</span><span style="color: #000088;">$func_name</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> sajax_export<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$sajax_export_list</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$n</span> <span style="color: #339933;">=</span> <span style="color: #990000;">func_num_args</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$n</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$sajax_export_list</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">func_get_arg</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000088;">$sajax_js_has_been_shown</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">function</span> sajax_get_javascript<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$sajax_js_has_been_shown</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$sajax_export_list</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$html</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span> <span style="color: #000088;">$sajax_js_has_been_shown</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> sajax_get_common_js<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$sajax_js_has_been_shown</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$sajax_export_list</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$func</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$html</span> <span style="color: #339933;">.=</span> sajax_get_one_stub<span style="color: #009900;">&#40;</span><span style="color: #000088;">$func</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$html</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> sajax_show_javascript<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> sajax_get_javascript<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
	<span style="color: #000088;">$SAJAX_INCLUDED</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<div style="height:20px;"></div>
<p>You can reference more info here at the <a href="http://www.modernmethod.com/sajax/" target="_blank">home site</a></p>
<div style="height:20px;"></div>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.devinberry.net%2F%3Fp%3D294&amp;linkname=Sajax%20%26%238211%3B%20PHP%20and%20AJAX"><img src="http://blog.devinberry.net/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.devinberry.net/?feed=rss2&amp;p=294</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Class &#8211; PHPMailer</title>
		<link>http://blog.devinberry.net/?p=286</link>
		<comments>http://blog.devinberry.net/?p=286#comments</comments>
		<pubDate>Thu, 12 Feb 2009 06:31:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Programming]]></category>

		<guid isPermaLink="false">http://blog.devinberry.net/?p=286</guid>
		<description><![CDATA[PHPMailer is a PHP class for PHP that provides a package of functions to send email. The two primary features are sending HTML Email and e-mails with attachments. PHPMailer supports nearly all possiblities to send email: mail(), Sendmail, qmail &#038; direct to SMTP server. You can use any feature of SMTP-based e-mail, multiple recepients via [...]]]></description>
			<content:encoded><![CDATA[<p>PHPMailer is a PHP class for PHP that provides a package of functions to send email. The two primary features are sending HTML Email and e-mails with attachments. PHPMailer supports nearly all possiblities to send email: mail(), Sendmail, qmail &#038; direct to SMTP server. You can use any feature of SMTP-based e-mail, multiple recepients via to, CC, BCC, etc. In short: PHPMailer is an efficient way to send e-mail within PHP.</p>
<div style="height:20px;"></div>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>  
&nbsp;
 <span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;class.phpmailer.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
&nbsp;
 <span style="color: #000088;">$mail</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PHPMailer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
&nbsp;
 <span style="color: #000088;">$mail</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">IsSMTP</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// telling the class to use SMTP  </span>
 <span style="color: #000088;">$mail</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Host</span>     <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;smtp.example.com&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// SMTP server  </span>
&nbsp;
 <span style="color: #000088;">$mail</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">From</span>     <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;from@example.com&quot;</span><span style="color: #339933;">;</span>  
 <span style="color: #000088;">$mail</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">AddAddress</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;myfriend@example.net&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
&nbsp;
 <span style="color: #000088;">$mail</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Subject</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;First PHPMailer Message&quot;</span><span style="color: #339933;">;</span>  
 <span style="color: #000088;">$mail</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Body</span>     <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Hi! <span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span> This is my first e-mail sent through PHPMailer.&quot;</span><span style="color: #339933;">;</span>  
 <span style="color: #000088;">$mail</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">WordWrap</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">50</span><span style="color: #339933;">;</span>  
&nbsp;
 <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$mail</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Send</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
   <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Message was not sent.'</span><span style="color: #339933;">;</span>  
   <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Mailer error: '</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$mail</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ErrorInfo</span><span style="color: #339933;">;</span>  
 <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>  
   <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Message has been sent.'</span><span style="color: #339933;">;</span>  
 <span style="color: #009900;">&#125;</span>  
 <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<div style="height:10px;"></div>
<p>You can find more code samples and the base class to download here:&nbsp;<a href="http://phpmailer.codeworxtech.com/index.php" target="_blank">Click Here</a></p>
<div style="height:10px;"></div>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.devinberry.net%2F%3Fp%3D286&amp;linkname=PHP%20Class%20%26%238211%3B%20PHPMailer"><img src="http://blog.devinberry.net/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.devinberry.net/?feed=rss2&amp;p=286</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Class &#8211; Geshi</title>
		<link>http://blog.devinberry.net/?p=241</link>
		<comments>http://blog.devinberry.net/?p=241#comments</comments>
		<pubDate>Thu, 12 Feb 2009 06:19:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Programming]]></category>

		<guid isPermaLink="false">http://blog.devinberry.net/?p=241</guid>
		<description><![CDATA[GeSHi is a Generic Syntax Highlighter for PHP and many other languages. The user inputs the source to be highlighted and a language to highlight it in, and GeSHi returns the source code, highlighted and formatted for the web. It includes features for increasing the speed of highlighting, changing how the source is displayed and [...]]]></description>
			<content:encoded><![CDATA[<p>GeSHi is a Generic Syntax Highlighter for PHP and many other languages. The user inputs the source to be highlighted and a language to highlight it in, and GeSHi returns the source code, highlighted and formatted for the web. It includes features for increasing the speed of highlighting, changing how the source is displayed and decreasing the amount of HTML source outputted for speed over slower connections.</p>
<div style="height:20px;"></div>
<p>GeSHi features also include:</p>
<ul>
<li>The ability to check for keywords in source code in either a case sensitive or non-case sensitive manner (for example, Java will only accept classes with TheCorrectCapitalisation, while in PHP it doesn&#8217;t matter)
<li>The ability to auto-caps/auto-noncaps keywords in the source (particularly for SQL and older BASIC dialects)</li>
<li>The ability to change the style of almost any aspect of the source on the fly, or even choose whether some parts of the source (for example, strings) are highlighted at all. The use of CSS means that the source can take on many aspects &#8211; rather than those provided by deprecated HTML elements such as font, b etc.</li>
<li>The ability to use CSS classes to massively reduce the amount of outputted code.</li>
<li>XHTML compliant output.</li>
<li>Simple adding and removing languages.</li>
<li>Function to URL conversion so functions can be linked to API documentation</li>
<li>Line numbering, context highlighting and much, much more!</li>
</ul>
<div style="border:1px solid black;overflow: auto; width: 100%; height: 100%;"><img src="http://blog.devinberry.net/wp-content/uploads/2009/02/48568.png" alt="48568" title="48568" width="724" height="561" class="alignleft size-full wp-image-243" /></div>
<div style="height:20px;"></div>
<p>The PHPClass page can be found here:&nbsp;<a href="http://www.phpclasses.org/browse/package/1759.html" target="_blank">Click Here</a><br />
The GeSHI HomePage can be found <a href="http://qbnz.com/highlighter/" target="_blank">here</a></p>
<div style="height:20px;"></div>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.devinberry.net%2F%3Fp%3D241&amp;linkname=PHP%20Class%20%26%238211%3B%20Geshi"><img src="http://blog.devinberry.net/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.devinberry.net/?feed=rss2&amp;p=241</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GraphicsMagick or ImageMagick</title>
		<link>http://blog.devinberry.net/?p=236</link>
		<comments>http://blog.devinberry.net/?p=236#comments</comments>
		<pubDate>Thu, 12 Feb 2009 05:44:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Programming]]></category>

		<guid isPermaLink="false">http://blog.devinberry.net/?p=236</guid>
		<description><![CDATA[At some point in a web site or web application project you are going to need Photoshop like capabilites and you are going to need them dynamically on the web. This is where packages like GD fall short and packages like ImageMagick nicely fit this bill however recently I was doing some research on ImageMagick [...]]]></description>
			<content:encoded><![CDATA[<p>At some point in a web site or web application project you are going to need Photoshop like capabilites and you are going to need them dynamically on the web. This is where packages like GD fall short and packages like ImageMagick nicely fit this bill however recently I was doing some research on ImageMagick something that we use a lot in our shop, ( using php just making command calls to ImageMagick ) and I came across a new project <a href="http://www.graphicsmagick.org/index.html" target="_blank">GraphicsMagic</a> or rather fork of the <a href="http://www.imagemagick.org/script/index.php" target="_blank">ImageMagick</a> project that not only claims to be faster and be less resource intensive but also claims that its Open Soucre Licensening is valid and the Licensing of ImageMagick is in question or at worst in violation. So as usual I am interested to here from others on this topic.</p>
<div style="height:20px;"></div>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.devinberry.net%2F%3Fp%3D236&amp;linkname=GraphicsMagick%20or%20ImageMagick"><img src="http://blog.devinberry.net/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.devinberry.net/?feed=rss2&amp;p=236</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Class &#8211; getID3</title>
		<link>http://blog.devinberry.net/?p=228</link>
		<comments>http://blog.devinberry.net/?p=228#comments</comments>
		<pubDate>Thu, 12 Feb 2009 05:17:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP Programming]]></category>

		<guid isPermaLink="false">http://blog.devinberry.net/?p=228</guid>
		<description><![CDATA[Today I was working on a media managent CMS tool and needed the ability to know what size ( screen resolution ) a video is, similar but different to using getimagesize() for an image. I came across an article on php.net and a class project on soureforge that offers a wealth of info on media [...]]]></description>
			<content:encoded><![CDATA[<p>Today I was working on a media managent CMS tool and needed the ability to know what size ( screen resolution ) a video is, similar but different to using getimagesize() for an image. I came across an article on php.net and a class project on soureforge that offers a wealth of info on media files of all types. I thought I would share what I found, getID3() is a PHP script that extracts useful information (such as ID3 tags, bitrate, playtime, etc.) from MP3s &#038; other multimedia file formats (Ogg, WMA, WMV, ASF, WAV, AVI, AAC, VQF, FLAC, MusePack, Real, QuickTime, Monkey&#8217;s Audio, MIDI and more).</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">// include getID3() library (can be in a different directory if full path is specified)</span>
 <span style="color: #b1b100;">include_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'getid3.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Initialize getID3 engine</span>
<span style="color: #000088;">$getID3</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> getID3<span style="color: #339933;">;</span>
&nbsp;
 <span style="color: #666666; font-style: italic;">// File to get info from</span>
 <span style="color: #000088;">$file_location</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'./your/path/to/file.mov'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Get information from the file</span>
 <span style="color: #000088;">$fileinfo</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$getID3</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">analyze</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file_location</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 getid3_lib<span style="color: #339933;">::</span><span style="color: #004000;">CopyTagsToComments</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fileinfo</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
 <span style="color: #666666; font-style: italic;">// Output results</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fileinfo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'video'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'resolution_x'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;p&gt; video width: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$fileinfo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'video'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'resolution_x'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/p&gt;'</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fileinfo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'video'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'resolution_y'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;p&gt; video height: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$fileinfo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'video'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'resolution_y'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&lt;/p&gt;'</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<div style="height:20px;"></div>
<p>The package referenced (<a href="http://www.getid3.org/" target="_blank">http://www.getid3.org/</a>)</p>
<div style="height:20px;"></div>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.devinberry.net%2F%3Fp%3D228&amp;linkname=PHP%20Class%20%26%238211%3B%20getID3"><img src="http://blog.devinberry.net/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.devinberry.net/?feed=rss2&amp;p=228</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reset OS X Password</title>
		<link>http://blog.devinberry.net/?p=224</link>
		<comments>http://blog.devinberry.net/?p=224#comments</comments>
		<pubDate>Tue, 03 Feb 2009 07:36:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mac OSX]]></category>
		<category><![CDATA[admin password]]></category>
		<category><![CDATA[hack a mac]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[os x]]></category>
		<category><![CDATA[reset admin password]]></category>
		<category><![CDATA[reset password]]></category>

		<guid isPermaLink="false">http://blog.devinberry.net/?p=224</guid>
		<description><![CDATA[I actually needed to do this for someone who had purchased a macbook and then did not use it for a bit, and subsequently forgot what they had set the admin password to. So this details how to reset the mac back and rerun the intsall utility so that you can recreate the new admin [...]]]></description>
			<content:encoded><![CDATA[<p>I actually needed to do this for someone who had purchased a macbook and then did not use it for a bit, and subsequently forgot what they had set the admin password to. So this details how to reset the mac back and rerun the intsall utility so that you can recreate the new admin account and then delete the old one. I know that I tested this on a really old version of OS X so I am sure that this would / should work on future versions of OS X however as always, if this has changed I would enjoy some feedback.</p>
<p>To reset your OS X password without an OS X CD you need to enter terminal and create a new admin account:</p>
<ol>
<li>Reboot</li>
<li>Hold apple + s down after you hear the chime. </li>
<li>When you get text prompt enter in these terminal commands to create a brand new admin account (hitting return after each line):</li>
<ul>
<li>mount -uw / </li>
<li>rm /var/db/.AppleSetupDone</li>
<li>shutdown -h now </li>
</ul>
</ol>
<p>After rebooting you should have a brand new admin account. When you login as the new admin you can simply delete the old one and you’re good to go again!</p>
<div style="height:20px;"></div>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.devinberry.net%2F%3Fp%3D224&amp;linkname=Reset%20OS%20X%20Password"><img src="http://blog.devinberry.net/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.devinberry.net/?feed=rss2&amp;p=224</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mondoarchive &#8211; Full bare metal system restore and data archiving</title>
		<link>http://blog.devinberry.net/?p=213</link>
		<comments>http://blog.devinberry.net/?p=213#comments</comments>
		<pubDate>Tue, 03 Feb 2009 07:10:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[complete restore]]></category>
		<category><![CDATA[file backup]]></category>
		<category><![CDATA[full bare metal backup]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[os image]]></category>
		<category><![CDATA[system backup]]></category>

		<guid isPermaLink="false">http://blog.devinberry.net/?p=213</guid>
		<description><![CDATA[I am sure as any admin will tell you that unless you can completely restore your server OS and its data, they are completely worthless, well almost. So with this in mind I have been researching the best option to do a bare metal backup restore of the OS in its most current state, along [...]]]></description>
			<content:encoded><![CDATA[<p>I am sure as any admin will tell you that unless you can completely restore your server OS and its data, they are completely worthless, well almost. So with this in mind I have been researching the best option to do a bare metal backup restore of the OS in its most current state, along with the precious data that we all cannot live without. I am somewhat new to Linux from the standpoint of System Administration but I think I have found the best of both worlds with this FREE tool called <a href="http://www.mondorescue.org/" target="_blank" title="Mondoarchive" alt="Mondoarchive">Mondoarchive</a>. The more that I read and used this tool the more that this is the ultimate backup tool to have. This will allow you from command line to execute a command, run this from a cron job and can be stored as an image, burned to disc/dvd, backed up to tape etc etc.<br />
This is a must for any linux user/system admin. Man pages are <a href="http://pwet.fr/man/linux/administration_systeme/mondoarchive" target="_blank" title="Mondoarchive man pages" alt="Mondoarchive man pages">here</a></p>
<div style="height:20px;"></div>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.devinberry.net%2F%3Fp%3D213&amp;linkname=Mondoarchive%20%26%238211%3B%20Full%20bare%20metal%20system%20restore%20and%20data%20archiving"><img src="http://blog.devinberry.net/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.devinberry.net/?feed=rss2&amp;p=213</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving files &#8211; Taking ownership of file or folder</title>
		<link>http://blog.devinberry.net/?p=210</link>
		<comments>http://blog.devinberry.net/?p=210#comments</comments>
		<pubDate>Tue, 03 Feb 2009 06:55:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[cant move old files]]></category>
		<category><![CDATA[file from old computer]]></category>
		<category><![CDATA[files locked with password from old computer]]></category>
		<category><![CDATA[moving files]]></category>
		<category><![CDATA[unlocking old file]]></category>

		<guid isPermaLink="false">http://blog.devinberry.net/?p=210</guid>
		<description><![CDATA[So I was asked by a friend to help him with his computer&#8230;&#8230;again. So this time it was a moving of files from one computer to the new one. The old box had Windows XP on it and the new box was of course the dreaded Vista. The problem occured when I took the hard [...]]]></description>
			<content:encoded><![CDATA[<p>So I was asked by a friend to help him with his computer&#8230;&#8230;again. So this time it was a moving of files from one computer to the new one. The old box had Windows XP on it and the new box was of course the dreaded Vista. The problem occured when I took the hard drive out of the old computer and hooked this up as a n USB external device to the new computer the drive would not let me access the contents of the folders. I was logged in as admin on the new machine, but still no go. I did some research and came accross this article on mircosoft&#8217;s website which in detail explained the problem and how to fix this. I am sure this would work regardless of how the transfer would have worked ( Vista to XP ?? ), however if not respond and let me know.<br />
Here is the <a href="http://support.microsoft.com/kb/308421" target="_blank" title="To take ownership of a file or folder" alt="To take ownership of a file or folder">Microsoft article</a></p>
<div style="height:20px;"></div>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.devinberry.net%2F%3Fp%3D210&amp;linkname=Moving%20files%20%26%238211%3B%20Taking%20ownership%20of%20file%20or%20folder"><img src="http://blog.devinberry.net/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.devinberry.net/?feed=rss2&amp;p=210</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CocoaMySQL &#8211; MAC database management</title>
		<link>http://blog.devinberry.net/?p=170</link>
		<comments>http://blog.devinberry.net/?p=170#comments</comments>
		<pubDate>Mon, 02 Feb 2009 07:07:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://blog.devinberry.net/?p=170</guid>
		<description><![CDATA[The Mac database management app, CocoaMySQL, is the brainchild of Lorenz Textor. Lorenz was the creator and the main developer of CocoaMySQL from its early beginnings in 2003. Without Lorenz&#8217;s contributions to CocoaMySQL, the Mac database landscape would be very different today. Sequel Pro is the successor of CocoaMySQL. Download Sequel Pro from the dowload [...]]]></description>
			<content:encoded><![CDATA[<p>The Mac database management app, CocoaMySQL, is the brainchild of Lorenz Textor. Lorenz was the creator and the main developer of CocoaMySQL from its early beginnings in 2003. Without Lorenz&#8217;s contributions to CocoaMySQL, the Mac database landscape would be very different today. Sequel Pro is the successor of CocoaMySQL. Download Sequel Pro from the dowload page. A copy of CocoaMySQL 0.7 beta 6 is available from the release archives for users running Mac OS X Tiger and Mac OS X Panther.CocoaMySQL is an application used to manage MySQL databases (locally or over the internet). It lets you add and remove databases and tables, change fields and indexes, view and filter the content of tables, add, edit and remove rows, perform custom queries and dump tables or entire databases.CocoaMySQL is written in Cocoa and Objective-C and uses the SMySQL framework by Serge Cohen to connect to the MySQL-Server. You can manage servers that are local and remote.
<p>For more information: <a href="http://www.sequelpro.com/cocoamysql.html" target="_blank">http://www.sequelpro.com/cocoamysql.html</a><br />
Google Code Home: <a href="http://code.google.com/p/sequel-pro/" target="_blank">http://code.google.com/p/sequel-pro/</a></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.devinberry.net%2F%3Fp%3D170&amp;linkname=CocoaMySQL%20%26%238211%3B%20MAC%20database%20management"><img src="http://blog.devinberry.net/wp-content/plugins/add-to-any/share_save_120_16.png" width="120" height="16" alt="Share/Save/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.devinberry.net/?feed=rss2&amp;p=170</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
