<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب  - قسم اسئلة PHP]]></title>
		<link>https://vb4arb.com/vb/</link>
		<description><![CDATA[منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب  - https://vb4arb.com/vb]]></description>
		<pubDate>Wed, 22 Apr 2026 23:19:07 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[اريد سحب ملفين مثلا من رابطين مختلفين في الكود]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56244</link>
			<pubDate>Wed, 22 Apr 2026 18:45:22 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=49603">nnnjk</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56244</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
اريد من الاخوه الاعزاء تعديل هذا الملف ليسحب ملفين من رابطين مختلفين وحبذا لو استخدم متغير<br />
<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code>&#36;r=0;<br />
  مثلا<br />
&#36;url=&#36;_POST['url']['&#36;r'];</code></div></div></div>
<br />
هذا الكود<br />
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">@</span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">'Content-type:&nbsp;text/html;charset=windows-1256'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;opts&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #0000BB"> &nbsp;<br />&nbsp;</span><span style="color: #DD0000">'http'</span><span style="color: #007700">=&gt;array(</span><span style="color: #0000BB"> &nbsp;<br /> &nbsp;</span><span style="color: #DD0000">'method'</span><span style="color: #007700">=&gt;</span><span style="color: #DD0000">"GET"</span><span style="color: #007700">,</span><span style="color: #0000BB"> &nbsp;<br /> &nbsp;&nbsp;</span><span style="color: #DD0000">'timeout'</span><span style="color: #007700">=&gt;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'ignore_errors'</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">true<br /><br /> &nbsp;&nbsp;</span><span style="color: #007700">)</span><span style="color: #0000BB"> &nbsp;<br /> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">);</span><span style="color: #0000BB"> &nbsp;<br />&#36;context&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">stream_context_create<br /></span><span style="color: #007700">([</span><span style="color: #DD0000">"http"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"header"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"User-Agent:Mozilla/5.0&nbsp;(Linux;&nbsp;Android&nbsp;5.0;&nbsp;SM-G900FD)&nbsp;AppleWebKit/537.36&nbsp;(KHTML,&nbsp;like&nbsp;Gecko)&nbsp;Chrome/95.0.4638.74&nbsp;Mobile&nbsp;Safari/537.36"<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">),<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'ssl'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;[<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'verify_peer'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'verify_peer_name'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">],<br />]<br />);<br /></span><span style="color: #0000BB"> &nbsp;</span><span style="color: #FF8000">//&#36;contexttt&nbsp;=&nbsp;stream_context_create(&#36;opts); &nbsp;<br /></span><span style="color: #0000BB"> &nbsp;&nbsp;<br /></span><span style="color: #FF8000">/*&nbsp;&#36;file&nbsp;=&nbsp;'https://vb4arb.com/vb/attachment.php?aid=30174';<br />&#36;newfile&nbsp;=&nbsp;'/home/xxx/domains/xxx.com/public_html/uploads/gooo.jpg';<br />(copy(&#36;file,&nbsp;&#36;newfile,false,&#36;contexttt));<br /><br /><br />if&nbsp;(!copy(&#36;file,&nbsp;&#36;newfile))&nbsp;{<br /> &nbsp; &nbsp;echo&nbsp;"failed&nbsp;to&nbsp;copy&nbsp;&#36;file...&#092;n";<br />}*/<br />//error_reporting(E_ALL);<br /></span><span style="color: #0000BB">date_default_timezone_set</span><span style="color: #007700">(</span><span style="color: #DD0000">"Asia/riyadh"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//include("downloads.php");<br />/*<br />&#36;agent&nbsp;=&nbsp;&#36;_SERVER["HTTP_USER_AGENT"];<br /><br />if(&nbsp;preg_match('/MSIE&nbsp;(&#092;d+&#092;.&#092;d+);/',&nbsp;&#36;agent)&nbsp;)&nbsp;{<br /> &nbsp;echo&nbsp;"You're&nbsp;using&nbsp;Internet&nbsp;Explorer";<br />}&nbsp;else&nbsp;if&nbsp;(preg_match('/Chrome[&#092;/&#092;s](&#092;d+&#092;.&#092;d+)/',&nbsp;&#36;agent)&nbsp;)&nbsp;{<br /> &nbsp;echo&nbsp;"You're&nbsp;using&nbsp;Chrome";<br />}&nbsp;else&nbsp;if&nbsp;(preg_match('/Edge&#092;/&#092;d+/',&nbsp;&#36;agent)&nbsp;)&nbsp;{<br /> &nbsp;echo&nbsp;"You're&nbsp;using&nbsp;Edge";<br />}&nbsp;else&nbsp;if&nbsp;(&nbsp;preg_match('/Firefox[&#092;/&#092;s](&#092;d+&#092;.&#092;d+)/',&nbsp;&#36;agent)&nbsp;)&nbsp;{<br /> &nbsp;echo&nbsp;"You're&nbsp;using&nbsp;Firefox";<br />}&nbsp;else&nbsp;if&nbsp;(&nbsp;preg_match('/OPR[&#092;/&#092;s](&#092;d+&#092;.&#092;d+)/',&nbsp;&#36;agent)&nbsp;)&nbsp;{<br /> &nbsp;echo&nbsp;"You're&nbsp;using&nbsp;Opera";<br />}&nbsp;else&nbsp;if&nbsp;(preg_match('/Safari[&#092;/&#092;s](&#092;d+&#092;.&#092;d+)/',&nbsp;&#36;agent)&nbsp;)&nbsp;{<br /> &nbsp;echo&nbsp;"You're&nbsp;using&nbsp;Safari";<br />}<br />*/<br />//ini_set('user_agent',&nbsp;'My-Application/2.5');<br /><br />&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">watermark</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;logo</span><span style="color: #007700">){<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/jpg|jpeg/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromjpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/webp/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromwebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/png/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/gif/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromgif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;(preg_match("/svg/",&#36;ext)){&#36;src_img=imagecreatefromsvg(&#36;name);}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;src_logo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;logo</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bwidth &nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSX</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bheight&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSY</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;lwidth &nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSX</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;lheight&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSY</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//fix&nbsp;bug&nbsp;for&nbsp;1beta3<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(&nbsp;</span><span style="color: #0000BB">&#36;bwidth&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">160&nbsp;</span><span style="color: #007700">&amp;&amp;</span><span style="color: #0000BB"> &nbsp;&#36;bheight&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">130&nbsp;</span><span style="color: #007700">)&nbsp;{<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;src_x&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;bwidth&nbsp;</span><span style="color: #007700">-&nbsp;(</span><span style="color: #0000BB">&#36;lwidth&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;src_y&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;bheight&nbsp;</span><span style="color: #007700">-&nbsp;(</span><span style="color: #0000BB">&#36;lheight&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;ImageAlphaBlending</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;ImageCopy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_x</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_y</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;lwidth</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;lheight</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/jpg|jpeg/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagejpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/png/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagepng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/webp/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagewebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/gif/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagegif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;(preg_match("/svg/",&#36;ext)){imagesvg(&#36;src_img,&nbsp;&#36;name);}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">}</span><span style="color: #FF8000">#&nbsp;&lt;&nbsp;150<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">else<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />}<br /><br /></span><span style="color: #FF8000">//blog.theonlytutorials.com<br /><br />//blog.theonlytutorials.com<br />//author:&nbsp;agurchand<br />&nbsp;</span><span style="color: #0000BB">&#36;memory_limit</span><span style="color: #007700">=</span><span style="color: #DD0000">'128M'</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">&#36;max_execution_time</span><span style="color: #007700">=</span><span style="color: #DD0000">'300'</span><span style="color: #007700">;<br />if(</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">){<br /></span><span style="color: #FF8000">//get&nbsp;the&nbsp;url<br /></span><span style="color: #0000BB">&#36;url&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'url'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;urls&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'urls'</span><span style="color: #007700">];<br /></span><span style="color: #FF8000">//add&nbsp;time&nbsp;to&nbsp;the&nbsp;current<br /></span><span style="color: #0000BB">&#36;newname</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">basename</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;urls</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//add&nbsp;time&nbsp;to&nbsp;the&nbsp;current&nbsp;filename<br /></span><span style="color: #0000BB">&#36;name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">basename</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;url</span><span style="color: #007700">);<br />list(</span><span style="color: #0000BB">&#36;txt</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ext&nbsp;</span><span style="color: #007700">)&nbsp;=&nbsp;</span><span style="color: #0000BB">explode</span><span style="color: #007700">(</span><span style="color: #DD0000">"."</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);<br />list(</span><span style="color: #0000BB">&#36;txt</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;type&nbsp;</span><span style="color: #007700">)&nbsp;=&nbsp;</span><span style="color: #0000BB">explode</span><span style="color: #007700">(</span><span style="color: #DD0000">"."</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;newname</span><span style="color: #007700">);<br />function&nbsp;</span><span style="color: #0000BB">convertToReadableSize</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;size</span><span style="color: #007700">){<br /></span><span style="color: #0000BB"> &nbsp;&#36;base&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">log</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;size</span><span style="color: #007700">)&nbsp;/&nbsp;</span><span style="color: #0000BB">log</span><span style="color: #007700">(</span><span style="color: #0000BB">1024</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp;&#36;suffix&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">""</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"KB"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"MB"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"GB"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"TB"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp;&#36;f_base&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">floor</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;base</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">round</span><span style="color: #007700">(</span><span style="color: #0000BB">pow</span><span style="color: #007700">(</span><span style="color: #0000BB">1024</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;base&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">floor</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;base</span><span style="color: #007700">)),&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #0000BB">&#36;suffix</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;f_base</span><span style="color: #007700">];<br />}<br /></span><span style="color: #FF8000">/*&#36;curl_handle=curl_init();<br />curl_setopt(&#36;curl_handle,&nbsp;CURLOPT_URL,'&#36;url');<br />curl_setopt(&#36;curl_handle,&nbsp;CURLOPT_CONNECTTIMEOUT,&nbsp;2);<br />curl_setopt(&#36;curl_handle,&nbsp;CURLOPT_RETURNTRANSFER,&nbsp;1);<br />curl_setopt(&#36;curl_handle,&nbsp;CURLOPT_USERAGENT,&nbsp;'&#36;name');<br />&#36;name&nbsp;=&nbsp;curl_exec(&#36;curl_handle);<br />curl_close(&#36;curl_handle);*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">curl</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;url</span><span style="color: #007700">){<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;ch&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">curl_init</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_URL</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;url</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_RETURNTRANSFER</span><span style="color: #007700">,</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">curl_exec</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;curl_close&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">);<br />}<br /><br />function&nbsp;</span><span style="color: #0000BB">file_get_html</span><span style="color: #007700">()&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;dom&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">simple_html_dom</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;args&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">func_get_args</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;dom</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">load</span><span style="color: #007700">(</span><span style="color: #0000BB">call_user_func_array</span><span style="color: #007700">(</span><span style="color: #DD0000">'curl'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;args</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">&#36;dom</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">&#36;ch&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">curl_init</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;url</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #0000BB">curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,</span><span style="color: #0000BB">CURLOPT_RETURNTRANSFER</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TRUE</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #0000BB">curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,</span><span style="color: #0000BB">CURLOPT_HEADER</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TRUE</span><span style="color: #007700">);&nbsp;</span><span style="color: #0000BB">curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,</span><span style="color: #0000BB">CURLOPT_NOBODY</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TRUE</span><span style="color: #007700">);&nbsp;</span><span style="color: #0000BB">&#36;name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">curl_exec</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;size&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">curl_getinfo</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLINFO_CONTENT_LENGTH_DOWNLOAD</span><span style="color: #007700">);&nbsp;</span><span style="color: #0000BB">curl_close</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;sizee</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">convertToReadableSize</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;size</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//list(&#36;width,&nbsp;&#36;height)&nbsp;=&nbsp;getimagesize(&#36;url);<br /></span><span style="color: #0000BB">&#36;name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'d-m-Y-H:i:s'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">time</span><span style="color: #007700">());<br /></span><span style="color: #FF8000">//time();<br /></span><span style="color: #0000BB">&#36;password&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">trim</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #FF8000">//&nbsp;&lt;---&nbsp;this&nbsp;is&nbsp;not&nbsp;a&nbsp;good&nbsp;idea!<br /></span><span style="color: #007700">if((</span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;password</span><span style="color: #007700">)&nbsp;&gt;&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">)&nbsp;or&nbsp;</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">==</span><span style="color: #DD0000">"svg"</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp;&#36;ext</span><span style="color: #007700">=</span><span style="color: #DD0000">"jpg"</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&nbsp;&#36;uploadOk&nbsp;=&nbsp;0;<br /></span><span style="color: #007700">}<br /></span><span style="color: #0000BB">&#36;name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">.</span><span style="color: #DD0000">"."</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;newname&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;newname</span><span style="color: #007700">.</span><span style="color: #DD0000">""</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;type</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&#36;namess&nbsp;=&nbsp;basename(&#36;url);<br /></span><span style="color: #0000BB">&#36;files&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">SplFileInfo</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;exttt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;files</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getExtension</span><span style="color: #007700">();<br /></span><span style="color: #FF8000">//PATHINFO_EXTENSION<br /></span><span style="color: #0000BB">&#36;extt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">pathinfo</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">,</span><span style="color: #0000BB">PATHINFO_EXTENSION</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//if(&#36;exttt==""){&#36;ext=".jpg";}<br /></span><span style="color: #0000BB"> &nbsp;&#36;file_ext&nbsp;</span><span style="color: #007700">=&nbsp;(</span><span style="color: #0000BB">explode</span><span style="color: #007700">(</span><span style="color: #DD0000">'.'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp;&nbsp;&#36;end&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">end</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;file_ext</span><span style="color: #007700">);</span><span style="color: #0000BB"> &nbsp;<br /></span><span style="color: #FF8000">//&#36;ext="jpg";<br /></span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">=</span><span style="color: #DD0000">".jpg"</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;type</span><span style="color: #007700">=</span><span style="color: #DD0000">""</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;type</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&nbsp;&#36;ext&nbsp;=&nbsp;end(&#36;sepext); &nbsp; &nbsp; &nbsp;<br />/*&#36;t=array('jpg'&nbsp;,&nbsp;'png'&nbsp;,&nbsp;'gif','ip'&nbsp;,&nbsp;'rar');<br /> &nbsp; &nbsp;if(!in_array(&#36;ext,&#36;t))<br />{&nbsp;echo&nbsp;gggg;}else &nbsp;{<br />*/<br />&nbsp;//&#36;namee="http://xxx.com/uploads/&#36;name";<br />//&#36;size3=&nbsp;getimagesize("http://xxx.com/uploads/07-04-2026-21:16:01.jpg");<br />//&#36;size2=&nbsp;filesize("http://xxx.com/uploads/07-04-2026-22:20:46.webp")&nbsp;.&nbsp;'&nbsp;bytes';<br />//&#36;size1=convertToReadableSize("&#36;namee");<br />//here&nbsp;is&nbsp;the&nbsp;actual&nbsp;code&nbsp;to&nbsp;get&nbsp;the&nbsp;file&nbsp;from&nbsp;the&nbsp;url&nbsp;and&nbsp;save&nbsp;it&nbsp;to&nbsp;the&nbsp;uploads&nbsp;folder<br />//get&nbsp;the&nbsp;file&nbsp;from&nbsp;the&nbsp;url&nbsp;using&nbsp;file_get_contents&nbsp;and&nbsp;put&nbsp;it&nbsp;into&nbsp;the&nbsp;folder&nbsp;using&nbsp;file_put_contents<br /></span><span style="color: #007700">require_once(</span><span style="color: #DD0000">"files/ip.php"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;ip&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;user_ip</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp;&#36;description&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">strip_tags</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'desc'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB">&#36;descriptions</span><span style="color: #007700">=</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;description</span><span style="color: #DD0000">,</span><span style="color: #0000BB">&#36;name</span><span style="color: #DD0000">,</span><span style="color: #0000BB">&#36;ip</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;namess</span><span style="color: #007700">=</span><span style="color: #DD0000">"ddd"</span><span style="color: #007700">;</span><span style="color: #FF8000">/*<br />&#36;filelist&nbsp;=&nbsp;fopen("./files/".&#36;namess.".mfh","w");<br />fwrite(&#36;filelist,&nbsp;&#36;name&nbsp;."|".&nbsp;name&nbsp;."|".&nbsp;&#36;passkey&nbsp;."|".&nbsp;&#36;userip&nbsp;."|".&nbsp;&#36;time."|0|".&#36;description."|".&#36;passwerd."|".&#36;cat."|".&#36;_POST['pprotect']."|&#092;n");*/<br />//&#36;password=&#36;_GET['password'];<br /></span><span style="color: #0000BB">&#36;fh&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">"./files/"</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;namess</span><span style="color: #007700">.</span><span style="color: #DD0000">".mfh"</span><span style="color: #007700">,</span><span style="color: #DD0000">"a+"</span><span style="color: #007700">);&nbsp;</span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fh</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;descriptions</span><span style="color: #007700">.</span><span style="color: #DD0000">"&#092;n"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//write&nbsp;to&nbsp;txtfile<br />//fwrite(&#36;fh,&#36;password."&#092;n");&nbsp;<br />//&nbsp;write&nbsp;to&nbsp;txtfile<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fh</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;fileplacee</span><span style="color: #007700">=</span><span style="color: #DD0000">"uploads"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">wateermark</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileplacee</span><span style="color: #007700">.</span><span style="color: #DD0000">"/"</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;newname</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;type</span><span style="color: #007700">,</span><span style="color: #DD0000">'logo/logo.png'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;newfile&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'/home/xxx/domains/xxx.com/public_html/uploads/'</span><span style="color: #007700">.</span><span style="color: #0000BB">time</span><span style="color: #007700">().</span><span style="color: #DD0000">'.'</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;type</span><span style="color: #007700">.</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br />(</span><span style="color: #0000BB">copy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;urls</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;newfile</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">&#36;upload&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">file_put_contents</span><span style="color: #007700">(</span><span style="color: #DD0000">"uploads/</span><span style="color: #0000BB">&#36;name</span><span style="color: #DD0000">"</span><span style="color: #007700">,</span><span style="color: #0000BB">file_get_contents</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;url</span><span style="color: #007700">,</span><span style="color: #0000BB">false</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;context</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">&#36;fileplace</span><span style="color: #007700">=</span><span style="color: #DD0000">"uploads"</span><span style="color: #007700">;<br />@</span><span style="color: #0000BB">watermark</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileplace</span><span style="color: #007700">.</span><span style="color: #DD0000">"/"</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">,</span><span style="color: #DD0000">'logo/logo.png'</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//include('Thumbnail.class.php');<br />&nbsp;//&nbsp;&#36;thumb=new&nbsp;Thumbnail("&#36;name");<br />&nbsp;//&nbsp;&#36;thumb-&gt;quality='100'; &nbsp;&nbsp;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;&#36;thumb-&gt;process(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;generate&nbsp;image<br />&nbsp;//&nbsp;&#36;thumb-&gt;save("&#36;name");&nbsp;&nbsp;&nbsp;&nbsp;<br /></span><span style="color: #0000BB"> &nbsp;&#36;filesk</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;name</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&#36;name&nbsp;=&nbsp;str_replace("?format=jpg","gg",&#36;filesk);<br />//echo&nbsp;&#36;TXTREM&nbsp;;<br />//check&nbsp;success<br />//&#36;info&nbsp;=&nbsp;getimagesize('http://xxx.com/uploads/&#36;name');<br />/*&#36;tmp=&nbsp;tmpfile();<br />&#36;names=&nbsp;"http://xxx.com/uploads/&#36;name";<br />&#36;ch=curl_init(&#36;url);<br />curl_setopt_array(&#36;ch,array(<br />CURLOPT_FILE=&gt;&#36;tmp,<br />CURLOPT_ENCODING=&gt;''<br />));<br />curl_exec(&#36;ch);<br />curl_close(&#36;ch);<br />list(&#36;width,&nbsp;&#36;height)&nbsp;=&nbsp;getimagesize(&#36;names);<br />fclose(&#36;tmp);<br />&#36;filename&nbsp;=&nbsp;"http://xxx.com/uploads/07-04-2026-22:20:46.webp";<br />&#36;handle&nbsp;=&nbsp;fopen(&#36;filename,&nbsp;"r");<br />&#36;contents&nbsp;=&nbsp;fread(&#36;handle,&nbsp;filesize(&#36;filename));<br />fclose(&#36;handle);*/<br />//&#36;ss=filesize(&#36;name);<br /></span><span style="color: #0000BB">&#36;newfile</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">"/home/xxx/domains/xxx.com/public_html/"</span><span style="color: #007700">,</span><span style="color: #DD0000">"http://xxx.com/"</span><span style="color: #007700">,</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;newfile</span><span style="color: #DD0000">"</span><span style="color: #007700">);<br />if(</span><span style="color: #0000BB">&#36;upload</span><span style="color: #007700">)&nbsp;<br />&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Success:</span><span style="color: #0000BB">&#36;name</span><span style="color: #DD0000">,&lt;br&gt; &nbsp;type:&nbsp;</span><span style="color: #0000BB">&#36;extt</span><span style="color: #DD0000">,&nbsp;size:&nbsp;</span><span style="color: #0000BB">&#36;sizee</span><span style="color: #DD0000">,</span><span style="color: #0000BB">&#36;newfile</span><span style="color: #DD0000">,&lt;br&gt;</span><span style="color: #0000BB">&#36;name2</span><span style="color: #DD0000">&nbsp;&lt;a&nbsp;href='uploads/"</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">.</span><span style="color: #DD0000">"'&nbsp;target='_blank'&gt;Check&nbsp;Uploaded&lt;/a&gt;"</span><span style="color: #007700">;&nbsp;else&nbsp;</span><span style="color: #DD0000">"please&nbsp;check&nbsp;your&nbsp;folder&nbsp;permission"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #FF8000">//}<br /></span><span style="color: #0000BB">?&gt;<br /></span><br />&lt;html&gt;<br />&lt;head&gt;&lt;title&gt;Theonlytutorials&nbsp;-&nbsp;Simple&nbsp;File&nbsp;Upload&nbsp;from&nbsp;URL&nbsp;Script!&lt;/title&gt;&lt;/head&gt;<br />&lt;body&gt;<br />&lt;h3&gt;Theonlytutorials.com&nbsp;-&nbsp;Very&nbsp;Simple&nbsp;File&nbsp;Upload&nbsp;from&nbsp;URL&nbsp;Script!&lt;/h3&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;form&nbsp;action=""&nbsp;method="post"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Your&nbsp;URL:&nbsp;&lt;input&nbsp;type="text"&nbsp;name="url"&nbsp;/&gt;<br />&nbsp;&lt;input&nbsp;type="text"&nbsp;name="urls"&nbsp;/&gt;<br />&lt;input&nbsp;type="text"&nbsp;name="desc"&nbsp;/&gt;<br />&lt;input&nbsp;type="submit"&nbsp;value="upload&nbsp;Images"&nbsp;name="upload"/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/form&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;&nbsp;<br /></code></div></div></div>حاولت فيه مااستطعت<br />
مشكورين مقدما]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
اريد من الاخوه الاعزاء تعديل هذا الملف ليسحب ملفين من رابطين مختلفين وحبذا لو استخدم متغير<br />
<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code>&#36;r=0;<br />
  مثلا<br />
&#36;url=&#36;_POST['url']['&#36;r'];</code></div></div></div>
<br />
هذا الكود<br />
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">@</span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">'Content-type:&nbsp;text/html;charset=windows-1256'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;opts&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #0000BB"> &nbsp;<br />&nbsp;</span><span style="color: #DD0000">'http'</span><span style="color: #007700">=&gt;array(</span><span style="color: #0000BB"> &nbsp;<br /> &nbsp;</span><span style="color: #DD0000">'method'</span><span style="color: #007700">=&gt;</span><span style="color: #DD0000">"GET"</span><span style="color: #007700">,</span><span style="color: #0000BB"> &nbsp;<br /> &nbsp;&nbsp;</span><span style="color: #DD0000">'timeout'</span><span style="color: #007700">=&gt;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'ignore_errors'</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">true<br /><br /> &nbsp;&nbsp;</span><span style="color: #007700">)</span><span style="color: #0000BB"> &nbsp;<br /> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">);</span><span style="color: #0000BB"> &nbsp;<br />&#36;context&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">stream_context_create<br /></span><span style="color: #007700">([</span><span style="color: #DD0000">"http"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"header"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"User-Agent:Mozilla/5.0&nbsp;(Linux;&nbsp;Android&nbsp;5.0;&nbsp;SM-G900FD)&nbsp;AppleWebKit/537.36&nbsp;(KHTML,&nbsp;like&nbsp;Gecko)&nbsp;Chrome/95.0.4638.74&nbsp;Mobile&nbsp;Safari/537.36"<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">),<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'ssl'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;[<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'verify_peer'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'verify_peer_name'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">],<br />]<br />);<br /></span><span style="color: #0000BB"> &nbsp;</span><span style="color: #FF8000">//&#36;contexttt&nbsp;=&nbsp;stream_context_create(&#36;opts); &nbsp;<br /></span><span style="color: #0000BB"> &nbsp;&nbsp;<br /></span><span style="color: #FF8000">/*&nbsp;&#36;file&nbsp;=&nbsp;'https://vb4arb.com/vb/attachment.php?aid=30174';<br />&#36;newfile&nbsp;=&nbsp;'/home/xxx/domains/xxx.com/public_html/uploads/gooo.jpg';<br />(copy(&#36;file,&nbsp;&#36;newfile,false,&#36;contexttt));<br /><br /><br />if&nbsp;(!copy(&#36;file,&nbsp;&#36;newfile))&nbsp;{<br /> &nbsp; &nbsp;echo&nbsp;"failed&nbsp;to&nbsp;copy&nbsp;&#36;file...&#092;n";<br />}*/<br />//error_reporting(E_ALL);<br /></span><span style="color: #0000BB">date_default_timezone_set</span><span style="color: #007700">(</span><span style="color: #DD0000">"Asia/riyadh"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//include("downloads.php");<br />/*<br />&#36;agent&nbsp;=&nbsp;&#36;_SERVER["HTTP_USER_AGENT"];<br /><br />if(&nbsp;preg_match('/MSIE&nbsp;(&#092;d+&#092;.&#092;d+);/',&nbsp;&#36;agent)&nbsp;)&nbsp;{<br /> &nbsp;echo&nbsp;"You're&nbsp;using&nbsp;Internet&nbsp;Explorer";<br />}&nbsp;else&nbsp;if&nbsp;(preg_match('/Chrome[&#092;/&#092;s](&#092;d+&#092;.&#092;d+)/',&nbsp;&#36;agent)&nbsp;)&nbsp;{<br /> &nbsp;echo&nbsp;"You're&nbsp;using&nbsp;Chrome";<br />}&nbsp;else&nbsp;if&nbsp;(preg_match('/Edge&#092;/&#092;d+/',&nbsp;&#36;agent)&nbsp;)&nbsp;{<br /> &nbsp;echo&nbsp;"You're&nbsp;using&nbsp;Edge";<br />}&nbsp;else&nbsp;if&nbsp;(&nbsp;preg_match('/Firefox[&#092;/&#092;s](&#092;d+&#092;.&#092;d+)/',&nbsp;&#36;agent)&nbsp;)&nbsp;{<br /> &nbsp;echo&nbsp;"You're&nbsp;using&nbsp;Firefox";<br />}&nbsp;else&nbsp;if&nbsp;(&nbsp;preg_match('/OPR[&#092;/&#092;s](&#092;d+&#092;.&#092;d+)/',&nbsp;&#36;agent)&nbsp;)&nbsp;{<br /> &nbsp;echo&nbsp;"You're&nbsp;using&nbsp;Opera";<br />}&nbsp;else&nbsp;if&nbsp;(preg_match('/Safari[&#092;/&#092;s](&#092;d+&#092;.&#092;d+)/',&nbsp;&#36;agent)&nbsp;)&nbsp;{<br /> &nbsp;echo&nbsp;"You're&nbsp;using&nbsp;Safari";<br />}<br />*/<br />//ini_set('user_agent',&nbsp;'My-Application/2.5');<br /><br />&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">watermark</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;logo</span><span style="color: #007700">){<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/jpg|jpeg/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromjpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/webp/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromwebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/png/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/gif/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromgif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;(preg_match("/svg/",&#36;ext)){&#36;src_img=imagecreatefromsvg(&#36;name);}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;src_logo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;logo</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bwidth &nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSX</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bheight&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSY</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;lwidth &nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSX</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;lheight&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSY</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//fix&nbsp;bug&nbsp;for&nbsp;1beta3<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(&nbsp;</span><span style="color: #0000BB">&#36;bwidth&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">160&nbsp;</span><span style="color: #007700">&amp;&amp;</span><span style="color: #0000BB"> &nbsp;&#36;bheight&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">130&nbsp;</span><span style="color: #007700">)&nbsp;{<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;src_x&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;bwidth&nbsp;</span><span style="color: #007700">-&nbsp;(</span><span style="color: #0000BB">&#36;lwidth&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;src_y&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;bheight&nbsp;</span><span style="color: #007700">-&nbsp;(</span><span style="color: #0000BB">&#36;lheight&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;ImageAlphaBlending</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;ImageCopy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_x</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_y</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;lwidth</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;lheight</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/jpg|jpeg/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagejpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/png/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagepng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/webp/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagewebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/gif/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagegif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;(preg_match("/svg/",&#36;ext)){imagesvg(&#36;src_img,&nbsp;&#36;name);}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">}</span><span style="color: #FF8000">#&nbsp;&lt;&nbsp;150<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">else<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />}<br /><br /></span><span style="color: #FF8000">//blog.theonlytutorials.com<br /><br />//blog.theonlytutorials.com<br />//author:&nbsp;agurchand<br />&nbsp;</span><span style="color: #0000BB">&#36;memory_limit</span><span style="color: #007700">=</span><span style="color: #DD0000">'128M'</span><span style="color: #007700">;<br />&nbsp;</span><span style="color: #0000BB">&#36;max_execution_time</span><span style="color: #007700">=</span><span style="color: #DD0000">'300'</span><span style="color: #007700">;<br />if(</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">){<br /></span><span style="color: #FF8000">//get&nbsp;the&nbsp;url<br /></span><span style="color: #0000BB">&#36;url&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'url'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;urls&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'urls'</span><span style="color: #007700">];<br /></span><span style="color: #FF8000">//add&nbsp;time&nbsp;to&nbsp;the&nbsp;current<br /></span><span style="color: #0000BB">&#36;newname</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">basename</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;urls</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//add&nbsp;time&nbsp;to&nbsp;the&nbsp;current&nbsp;filename<br /></span><span style="color: #0000BB">&#36;name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">basename</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;url</span><span style="color: #007700">);<br />list(</span><span style="color: #0000BB">&#36;txt</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ext&nbsp;</span><span style="color: #007700">)&nbsp;=&nbsp;</span><span style="color: #0000BB">explode</span><span style="color: #007700">(</span><span style="color: #DD0000">"."</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);<br />list(</span><span style="color: #0000BB">&#36;txt</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;type&nbsp;</span><span style="color: #007700">)&nbsp;=&nbsp;</span><span style="color: #0000BB">explode</span><span style="color: #007700">(</span><span style="color: #DD0000">"."</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;newname</span><span style="color: #007700">);<br />function&nbsp;</span><span style="color: #0000BB">convertToReadableSize</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;size</span><span style="color: #007700">){<br /></span><span style="color: #0000BB"> &nbsp;&#36;base&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">log</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;size</span><span style="color: #007700">)&nbsp;/&nbsp;</span><span style="color: #0000BB">log</span><span style="color: #007700">(</span><span style="color: #0000BB">1024</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp;&#36;suffix&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">""</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"KB"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"MB"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"GB"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"TB"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp;&#36;f_base&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">floor</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;base</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">round</span><span style="color: #007700">(</span><span style="color: #0000BB">pow</span><span style="color: #007700">(</span><span style="color: #0000BB">1024</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;base&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">floor</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;base</span><span style="color: #007700">)),&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #0000BB">&#36;suffix</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;f_base</span><span style="color: #007700">];<br />}<br /></span><span style="color: #FF8000">/*&#36;curl_handle=curl_init();<br />curl_setopt(&#36;curl_handle,&nbsp;CURLOPT_URL,'&#36;url');<br />curl_setopt(&#36;curl_handle,&nbsp;CURLOPT_CONNECTTIMEOUT,&nbsp;2);<br />curl_setopt(&#36;curl_handle,&nbsp;CURLOPT_RETURNTRANSFER,&nbsp;1);<br />curl_setopt(&#36;curl_handle,&nbsp;CURLOPT_USERAGENT,&nbsp;'&#36;name');<br />&#36;name&nbsp;=&nbsp;curl_exec(&#36;curl_handle);<br />curl_close(&#36;curl_handle);*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">curl</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;url</span><span style="color: #007700">){<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;ch&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">curl_init</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_URL</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;url</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_RETURNTRANSFER</span><span style="color: #007700">,</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">curl_exec</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;curl_close&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">);<br />}<br /><br />function&nbsp;</span><span style="color: #0000BB">file_get_html</span><span style="color: #007700">()&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;dom&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">simple_html_dom</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;args&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">func_get_args</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;dom</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">load</span><span style="color: #007700">(</span><span style="color: #0000BB">call_user_func_array</span><span style="color: #007700">(</span><span style="color: #DD0000">'curl'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;args</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">&#36;dom</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">&#36;ch&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">curl_init</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;url</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #0000BB">curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,</span><span style="color: #0000BB">CURLOPT_RETURNTRANSFER</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TRUE</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #0000BB">curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,</span><span style="color: #0000BB">CURLOPT_HEADER</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TRUE</span><span style="color: #007700">);&nbsp;</span><span style="color: #0000BB">curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,</span><span style="color: #0000BB">CURLOPT_NOBODY</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TRUE</span><span style="color: #007700">);&nbsp;</span><span style="color: #0000BB">&#36;name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">curl_exec</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;size&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">curl_getinfo</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLINFO_CONTENT_LENGTH_DOWNLOAD</span><span style="color: #007700">);&nbsp;</span><span style="color: #0000BB">curl_close</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;sizee</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">convertToReadableSize</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;size</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//list(&#36;width,&nbsp;&#36;height)&nbsp;=&nbsp;getimagesize(&#36;url);<br /></span><span style="color: #0000BB">&#36;name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'d-m-Y-H:i:s'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">time</span><span style="color: #007700">());<br /></span><span style="color: #FF8000">//time();<br /></span><span style="color: #0000BB">&#36;password&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">trim</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #FF8000">//&nbsp;&lt;---&nbsp;this&nbsp;is&nbsp;not&nbsp;a&nbsp;good&nbsp;idea!<br /></span><span style="color: #007700">if((</span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;password</span><span style="color: #007700">)&nbsp;&gt;&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">)&nbsp;or&nbsp;</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">==</span><span style="color: #DD0000">"svg"</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp;&#36;ext</span><span style="color: #007700">=</span><span style="color: #DD0000">"jpg"</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&nbsp;&#36;uploadOk&nbsp;=&nbsp;0;<br /></span><span style="color: #007700">}<br /></span><span style="color: #0000BB">&#36;name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">.</span><span style="color: #DD0000">"."</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;newname&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;newname</span><span style="color: #007700">.</span><span style="color: #DD0000">""</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;type</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&#36;namess&nbsp;=&nbsp;basename(&#36;url);<br /></span><span style="color: #0000BB">&#36;files&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">SplFileInfo</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;exttt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;files</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getExtension</span><span style="color: #007700">();<br /></span><span style="color: #FF8000">//PATHINFO_EXTENSION<br /></span><span style="color: #0000BB">&#36;extt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">pathinfo</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">,</span><span style="color: #0000BB">PATHINFO_EXTENSION</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//if(&#36;exttt==""){&#36;ext=".jpg";}<br /></span><span style="color: #0000BB"> &nbsp;&#36;file_ext&nbsp;</span><span style="color: #007700">=&nbsp;(</span><span style="color: #0000BB">explode</span><span style="color: #007700">(</span><span style="color: #DD0000">'.'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp;&nbsp;&#36;end&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">end</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;file_ext</span><span style="color: #007700">);</span><span style="color: #0000BB"> &nbsp;<br /></span><span style="color: #FF8000">//&#36;ext="jpg";<br /></span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">=</span><span style="color: #DD0000">".jpg"</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;type</span><span style="color: #007700">=</span><span style="color: #DD0000">""</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;type</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&nbsp;&#36;ext&nbsp;=&nbsp;end(&#36;sepext); &nbsp; &nbsp; &nbsp;<br />/*&#36;t=array('jpg'&nbsp;,&nbsp;'png'&nbsp;,&nbsp;'gif','ip'&nbsp;,&nbsp;'rar');<br /> &nbsp; &nbsp;if(!in_array(&#36;ext,&#36;t))<br />{&nbsp;echo&nbsp;gggg;}else &nbsp;{<br />*/<br />&nbsp;//&#36;namee="http://xxx.com/uploads/&#36;name";<br />//&#36;size3=&nbsp;getimagesize("http://xxx.com/uploads/07-04-2026-21:16:01.jpg");<br />//&#36;size2=&nbsp;filesize("http://xxx.com/uploads/07-04-2026-22:20:46.webp")&nbsp;.&nbsp;'&nbsp;bytes';<br />//&#36;size1=convertToReadableSize("&#36;namee");<br />//here&nbsp;is&nbsp;the&nbsp;actual&nbsp;code&nbsp;to&nbsp;get&nbsp;the&nbsp;file&nbsp;from&nbsp;the&nbsp;url&nbsp;and&nbsp;save&nbsp;it&nbsp;to&nbsp;the&nbsp;uploads&nbsp;folder<br />//get&nbsp;the&nbsp;file&nbsp;from&nbsp;the&nbsp;url&nbsp;using&nbsp;file_get_contents&nbsp;and&nbsp;put&nbsp;it&nbsp;into&nbsp;the&nbsp;folder&nbsp;using&nbsp;file_put_contents<br /></span><span style="color: #007700">require_once(</span><span style="color: #DD0000">"files/ip.php"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;ip&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;user_ip</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp;&#36;description&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">strip_tags</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'desc'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB">&#36;descriptions</span><span style="color: #007700">=</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;description</span><span style="color: #DD0000">,</span><span style="color: #0000BB">&#36;name</span><span style="color: #DD0000">,</span><span style="color: #0000BB">&#36;ip</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;namess</span><span style="color: #007700">=</span><span style="color: #DD0000">"ddd"</span><span style="color: #007700">;</span><span style="color: #FF8000">/*<br />&#36;filelist&nbsp;=&nbsp;fopen("./files/".&#36;namess.".mfh","w");<br />fwrite(&#36;filelist,&nbsp;&#36;name&nbsp;."|".&nbsp;name&nbsp;."|".&nbsp;&#36;passkey&nbsp;."|".&nbsp;&#36;userip&nbsp;."|".&nbsp;&#36;time."|0|".&#36;description."|".&#36;passwerd."|".&#36;cat."|".&#36;_POST['pprotect']."|&#092;n");*/<br />//&#36;password=&#36;_GET['password'];<br /></span><span style="color: #0000BB">&#36;fh&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">"./files/"</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;namess</span><span style="color: #007700">.</span><span style="color: #DD0000">".mfh"</span><span style="color: #007700">,</span><span style="color: #DD0000">"a+"</span><span style="color: #007700">);&nbsp;</span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fh</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;descriptions</span><span style="color: #007700">.</span><span style="color: #DD0000">"&#092;n"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//write&nbsp;to&nbsp;txtfile<br />//fwrite(&#36;fh,&#36;password."&#092;n");&nbsp;<br />//&nbsp;write&nbsp;to&nbsp;txtfile<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fh</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;fileplacee</span><span style="color: #007700">=</span><span style="color: #DD0000">"uploads"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">wateermark</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileplacee</span><span style="color: #007700">.</span><span style="color: #DD0000">"/"</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;newname</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;type</span><span style="color: #007700">,</span><span style="color: #DD0000">'logo/logo.png'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;newfile&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'/home/xxx/domains/xxx.com/public_html/uploads/'</span><span style="color: #007700">.</span><span style="color: #0000BB">time</span><span style="color: #007700">().</span><span style="color: #DD0000">'.'</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;type</span><span style="color: #007700">.</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br />(</span><span style="color: #0000BB">copy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;urls</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;newfile</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">&#36;upload&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">file_put_contents</span><span style="color: #007700">(</span><span style="color: #DD0000">"uploads/</span><span style="color: #0000BB">&#36;name</span><span style="color: #DD0000">"</span><span style="color: #007700">,</span><span style="color: #0000BB">file_get_contents</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;url</span><span style="color: #007700">,</span><span style="color: #0000BB">false</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;context</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">&#36;fileplace</span><span style="color: #007700">=</span><span style="color: #DD0000">"uploads"</span><span style="color: #007700">;<br />@</span><span style="color: #0000BB">watermark</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileplace</span><span style="color: #007700">.</span><span style="color: #DD0000">"/"</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">,</span><span style="color: #DD0000">'logo/logo.png'</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//include('Thumbnail.class.php');<br />&nbsp;//&nbsp;&#36;thumb=new&nbsp;Thumbnail("&#36;name");<br />&nbsp;//&nbsp;&#36;thumb-&gt;quality='100'; &nbsp;&nbsp;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;&#36;thumb-&gt;process(); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;generate&nbsp;image<br />&nbsp;//&nbsp;&#36;thumb-&gt;save("&#36;name");&nbsp;&nbsp;&nbsp;&nbsp;<br /></span><span style="color: #0000BB"> &nbsp;&#36;filesk</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;name</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&#36;name&nbsp;=&nbsp;str_replace("?format=jpg","gg",&#36;filesk);<br />//echo&nbsp;&#36;TXTREM&nbsp;;<br />//check&nbsp;success<br />//&#36;info&nbsp;=&nbsp;getimagesize('http://xxx.com/uploads/&#36;name');<br />/*&#36;tmp=&nbsp;tmpfile();<br />&#36;names=&nbsp;"http://xxx.com/uploads/&#36;name";<br />&#36;ch=curl_init(&#36;url);<br />curl_setopt_array(&#36;ch,array(<br />CURLOPT_FILE=&gt;&#36;tmp,<br />CURLOPT_ENCODING=&gt;''<br />));<br />curl_exec(&#36;ch);<br />curl_close(&#36;ch);<br />list(&#36;width,&nbsp;&#36;height)&nbsp;=&nbsp;getimagesize(&#36;names);<br />fclose(&#36;tmp);<br />&#36;filename&nbsp;=&nbsp;"http://xxx.com/uploads/07-04-2026-22:20:46.webp";<br />&#36;handle&nbsp;=&nbsp;fopen(&#36;filename,&nbsp;"r");<br />&#36;contents&nbsp;=&nbsp;fread(&#36;handle,&nbsp;filesize(&#36;filename));<br />fclose(&#36;handle);*/<br />//&#36;ss=filesize(&#36;name);<br /></span><span style="color: #0000BB">&#36;newfile</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">"/home/xxx/domains/xxx.com/public_html/"</span><span style="color: #007700">,</span><span style="color: #DD0000">"http://xxx.com/"</span><span style="color: #007700">,</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;newfile</span><span style="color: #DD0000">"</span><span style="color: #007700">);<br />if(</span><span style="color: #0000BB">&#36;upload</span><span style="color: #007700">)&nbsp;<br />&nbsp;echo&nbsp;</span><span style="color: #DD0000">"Success:</span><span style="color: #0000BB">&#36;name</span><span style="color: #DD0000">,&lt;br&gt; &nbsp;type:&nbsp;</span><span style="color: #0000BB">&#36;extt</span><span style="color: #DD0000">,&nbsp;size:&nbsp;</span><span style="color: #0000BB">&#36;sizee</span><span style="color: #DD0000">,</span><span style="color: #0000BB">&#36;newfile</span><span style="color: #DD0000">,&lt;br&gt;</span><span style="color: #0000BB">&#36;name2</span><span style="color: #DD0000">&nbsp;&lt;a&nbsp;href='uploads/"</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;name</span><span style="color: #007700">.</span><span style="color: #DD0000">"'&nbsp;target='_blank'&gt;Check&nbsp;Uploaded&lt;/a&gt;"</span><span style="color: #007700">;&nbsp;else&nbsp;</span><span style="color: #DD0000">"please&nbsp;check&nbsp;your&nbsp;folder&nbsp;permission"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #FF8000">//}<br /></span><span style="color: #0000BB">?&gt;<br /></span><br />&lt;html&gt;<br />&lt;head&gt;&lt;title&gt;Theonlytutorials&nbsp;-&nbsp;Simple&nbsp;File&nbsp;Upload&nbsp;from&nbsp;URL&nbsp;Script!&lt;/title&gt;&lt;/head&gt;<br />&lt;body&gt;<br />&lt;h3&gt;Theonlytutorials.com&nbsp;-&nbsp;Very&nbsp;Simple&nbsp;File&nbsp;Upload&nbsp;from&nbsp;URL&nbsp;Script!&lt;/h3&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;form&nbsp;action=""&nbsp;method="post"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Your&nbsp;URL:&nbsp;&lt;input&nbsp;type="text"&nbsp;name="url"&nbsp;/&gt;<br />&nbsp;&lt;input&nbsp;type="text"&nbsp;name="urls"&nbsp;/&gt;<br />&lt;input&nbsp;type="text"&nbsp;name="desc"&nbsp;/&gt;<br />&lt;input&nbsp;type="submit"&nbsp;value="upload&nbsp;Images"&nbsp;name="upload"/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/form&gt;<br />&lt;/body&gt;<br />&lt;/html&gt;&nbsp;<br /></code></div></div></div>حاولت فيه مااستطعت<br />
مشكورين مقدما]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[اريد اضافة ختم الصور لملف الرفع هذا]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56232</link>
			<pubDate>Fri, 17 Apr 2026 06:17:55 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=49603">nnnjk</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56232</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
تحية طيبة<br />
ارجوا من الاخوه الاكارم عموما ومن الاخ Amir_Alzubidy خصوصا مساعدتي في اظافة ختم الصور لملف الرفع هذا<br />
قمت بااظافة دالة ختم الصور لاكن لم يعمل الختم<br />
وهذا الملف مع دالة ختم الصور</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">watermark</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;logo</span><span style="color: #007700">){<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/jpg|jpeg/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromjpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/webp/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromwebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/png/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/gif/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromgif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;(preg_match("/svg/",&#36;ext[id])){&#36;src_img=imagecreatefromsvg(&#36;ss);}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;src_logo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;logo</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bwidth &nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSX</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bheight&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSY</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;lwidth &nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSX</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;lheight&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSY</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//fix&nbsp;bug&nbsp;for&nbsp;1beta3<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(&nbsp;</span><span style="color: #0000BB">&#36;bwidth&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">160&nbsp;</span><span style="color: #007700">&amp;&amp;</span><span style="color: #0000BB"> &nbsp;&#36;bheight&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">130&nbsp;</span><span style="color: #007700">)&nbsp;{<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;src_x&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;bwidth&nbsp;</span><span style="color: #007700">-&nbsp;(</span><span style="color: #0000BB">&#36;lwidth&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;src_y&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;bheight&nbsp;</span><span style="color: #007700">-&nbsp;(</span><span style="color: #0000BB">&#36;lheight&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;ImageAlphaBlending</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;ImageCopy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_x</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_y</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;lwidth</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;lheight</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/jpg|jpeg/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagejpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/png/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagepng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/webp/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagewebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/gif/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagegif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;(preg_match("/svg/",&#36;ext[id])){imagesvg(&#36;src_img,&nbsp;&#36;ss);}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">}</span><span style="color: #FF8000">#&nbsp;&lt;&nbsp;150<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">else<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />}<br /></span><span style="color: #FF8000">/*======================================================================*&#092;<br />||&nbsp;####################################################################&nbsp;||<br />||&nbsp;# &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;����&nbsp;���&nbsp;������� &nbsp;uploade&nbsp;v&nbsp;3.4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;#&nbsp;||<br />||&nbsp;# &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for&nbsp;vBulletin&nbsp;Version&nbsp;3.5.x&nbsp;AND&nbsp;3.6.x &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;#&nbsp;||<br />||&nbsp;# &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;http://7beebi.com &nbsp; &nbsp;����&nbsp;����� &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;#&nbsp;||<br />||&nbsp;# &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;webmaster@7beebi.com &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp;||<br />||&nbsp;####################################################################&nbsp;||<br />&#092;*======================================================================*/<br /><br />//&nbsp;########################&nbsp;SET&nbsp;PHP&nbsp;ENVIRONMENT&nbsp;###########################<br /></span><span style="color: #0000BB">error_reporting</span><span style="color: #007700">(</span><span style="color: #0000BB">E_ALL&nbsp;</span><span style="color: #007700">&amp;&nbsp;~</span><span style="color: #0000BB">E_NOTICE</span><span style="color: #007700">);<br />@</span><span style="color: #0000BB">set_time_limit</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'THIS_SCRIPT'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'uploader'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'NOPMPOPUP'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//&nbsp;###################&nbsp;PRE-CACHE&nbsp;TEMPLATES&nbsp;AND&nbsp;DATA&nbsp;######################<br /></span><span style="color: #007700">if&nbsp;(empty(</span><span style="color: #0000BB">&#36;_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">])&nbsp;OR&nbsp;(</span><span style="color: #0000BB">&#36;_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">]&nbsp;==&nbsp;</span><span style="color: #DD0000">'doupload'</span><span style="color: #007700">))<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'main'</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">&#36;phrasegroups&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">'uploader'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;specialtemplates&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /></span><span style="color: #FF8000">//&nbsp;pre-cache&nbsp;templates&nbsp;used&nbsp;by&nbsp;all&nbsp;actions<br /></span><span style="color: #0000BB">&#36;globaltemplates&nbsp;</span><span style="color: #007700">=&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_header'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_footer'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_msg'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_editor_msg'<br /></span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//&nbsp;pre-cache&nbsp;templates&nbsp;used&nbsp;by&nbsp;specific&nbsp;actions<br /></span><span style="color: #0000BB">&#36;actiontemplates&nbsp;</span><span style="color: #007700">=&nbsp;array(<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'main'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_files'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_filebit'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_bit'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_rules'<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">),<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'doupload'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_msgbit'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_upload'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">),<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'editor'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_editor'<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">),<br />);<br /><br /></span><span style="color: #FF8000">//&nbsp;#########################&nbsp;REQUIRE&nbsp;BACK-END&nbsp;############################<br /></span><span style="color: #007700">require_once(</span><span style="color: #DD0000">'./global.php'</span><span style="color: #007700">);<br />require_once(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/uploaderglobal.php'</span><span style="color: #007700">);<br />require_once(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/includes/adminfunctions.php'</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;required&nbsp;for&nbsp;can_administer<br /></span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">])<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">config</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader'</span><span style="color: #007700">][</span><span style="color: #DD0000">'password'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">config</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader'</span><span style="color: #007700">][</span><span style="color: #DD0000">'password'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br />}<br /></span><span style="color: #FF8000">//&nbsp;#######################################################################<br />//&nbsp;########################&nbsp;START&nbsp;MAIN&nbsp;SCRIPT&nbsp;############################<br />//&nbsp;#######################################################################<br /><br /></span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">]&nbsp;==&nbsp;</span><span style="color: #DD0000">'main'</span><span style="color: #007700">)<br />{<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">clean_array_gpc</span><span style="color: #007700">(</span><span style="color: #DD0000">'r'</span><span style="color: #007700">,&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'page'</span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">TYPE_INT</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'order'</span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">TYPE_STR</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'ascdesc'</span><span style="color: #0000BB"> &nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">TYPE_STR</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'thumbs'</span><span style="color: #0000BB"> &nbsp;&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">TYPE_BOOL</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'perpage'</span><span style="color: #0000BB"> &nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">TYPE_INT<br /> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'order'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'name'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;order&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'size'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;order&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'file_size'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">default:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;order&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'dateline'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'ascdesc'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'asc'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ascdesc&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'ASC'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">default:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ascdesc&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'DESC'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;page&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'page'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;thumbs&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'thumbs'</span><span style="color: #007700">];<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'perpage'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;perpage&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'perpage'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;perpage&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'upsperpage'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;perpage&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'upsmaxperpage'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;perpage&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'upsmaxperpage'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;files&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;filesdb&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;countups&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_first</span><span style="color: #007700">(</span><span style="color: #DD0000">"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SELECT&nbsp;COUNT(*)&nbsp;AS&nbsp;ups<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;AS&nbsp;uploader<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;countups</span><span style="color: #007700">[</span><span style="color: #DD0000">'ups'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;page&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;page&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else&nbsp;if&nbsp;(</span><span style="color: #0000BB">&#36;page&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">ceil</span><span style="color: #007700">((</span><span style="color: #0000BB">&#36;countups</span><span style="color: #007700">[</span><span style="color: #DD0000">'ups'</span><span style="color: #007700">]&nbsp;+&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;/&nbsp;</span><span style="color: #0000BB">&#36;perpage</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;page&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ceil</span><span style="color: #007700">((</span><span style="color: #0000BB">&#36;countups</span><span style="color: #007700">[</span><span style="color: #DD0000">'ups'</span><span style="color: #007700">]&nbsp;+&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;/&nbsp;</span><span style="color: #0000BB">&#36;perpage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;limitlower&nbsp;</span><span style="color: #007700">=&nbsp;(</span><span style="color: #0000BB">&#36;page&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;*&nbsp;</span><span style="color: #0000BB">&#36;perpage</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;userfiles&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_read</span><span style="color: #007700">(</span><span style="color: #DD0000">"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;SELECT&nbsp;*<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;ORDER&nbsp;BY&nbsp;</span><span style="color: #0000BB">&#36;order</span><span style="color: #DD0000">&nbsp;</span><span style="color: #0000BB">&#36;ascdesc</span><span style="color: #DD0000"><br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;LIMIT&nbsp;</span><span style="color: #0000BB">&#36;limitlower</span><span style="color: #DD0000">,&nbsp;</span><span style="color: #0000BB">&#36;perpage</span><span style="color: #DD0000"><br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">while&nbsp;(</span><span style="color: #0000BB">&#36;userfile&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfiles</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;bgclass&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">exec_switch_bg</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">/*<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(&#36;filesdb)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filesdb&nbsp;=&nbsp;&#36;userfile['file_name'];<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filesdb&nbsp;.=&nbsp;',&nbsp;'&nbsp;.&nbsp;&#36;userfile['file_name'];<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">strrchr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">'.'</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'gif'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpe'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'png'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'bmp'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;extimg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'images/uploadericon/img.gif'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;handelext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rm'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ra'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ram'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'3gp'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rmvb'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;extimg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'images/uploadericon/real.gif'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;handelext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mp3'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wave'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mid'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'avi'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wmv'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'asf'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'dat'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;extimg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'images/uploadericon/media.gif'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;handelext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'zip'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'gz'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'tar'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;extimg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'images/uploadericon/zip.gif'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;handelext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">default:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;extname&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;handelext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(@</span><span style="color: #0000BB">file_exists</span><span style="color: #007700">(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/images/uploadericon/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ext&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'.gif'</span><span style="color: #007700">)&nbsp;AND&nbsp;!</span><span style="color: #0000BB">&#36;handelext</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;extimg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'images/uploadericon/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ext&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'.gif'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">elseif(!</span><span style="color: #0000BB">&#36;handelext</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;extimg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'images/uploadericon/unknow.gif'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'thumbs'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'gif'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpe'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'png'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'bmp'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;a&nbsp;href="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;target="_blank"&nbsp;title="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'description'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&gt;&lt;img&nbsp;src="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;width="160"&nbsp;height="160"&nbsp;border="0"&nbsp;alt=""&nbsp;/&gt;&lt;/a&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'swf'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;embed&nbsp;src="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'" &nbsp;width="160"&nbsp;height="160"&nbsp;quality="high"&nbsp;loop="false"&nbsp;menu="false"&nbsp;TYPE="application/x-shockwave-flash"&nbsp;wmode="transparent"&nbsp;AllowScriptAccess="never"&nbsp;nojava="true"&nbsp;/&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rm'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ra'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ram'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'3gp'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rmvb'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;embed&nbsp;SRC="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;type="audio/x-pn-realaudio-plugin"&nbsp;CONSOLE="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'id'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;CONTROLS="ImageWindow,ControlPanel,StatusBar"&nbsp;width="160"&nbsp;height="160"&nbsp;AUTOSTART="false"&nbsp;AllowScriptAccess="never"&nbsp;nojava="true"&nbsp;/&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mp3'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wave'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mid'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'avi'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wmv'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'asf'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'dat'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;object&nbsp;width="160"&nbsp;height="160"&nbsp;classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"&nbsp;id="PTMediaPlayer"&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="URL"&nbsp;value="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="rate"&nbsp;value="1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="currentPosition"&nbsp;value="0"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="playCount"&nbsp;value="1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="autoStart"&nbsp;value="0"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="uiMode"&nbsp;value="mini"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="stretchToFit"&nbsp;value="-1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="enableContextMenu"&nbsp;value="-1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;/object&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">default:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">iif</span><span style="color: #007700">(</span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">])&nbsp;&gt;&nbsp;</span><span style="color: #0000BB">30&nbsp;</span><span style="color: #007700">,</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">30</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"..."</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;a&nbsp;href="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;target="_blank"&nbsp;title="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'description'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;/a&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">iif</span><span style="color: #007700">(</span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">])&nbsp;&gt;&nbsp;</span><span style="color: #0000BB">50&nbsp;</span><span style="color: #007700">,</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">30</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"..."</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;a&nbsp;href="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;target="_blank"&nbsp;title="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'description'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;/a&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'dateline'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">vbdate</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'dateformat'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'dateline'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_size'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">vb_number_format</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_size'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'&#36;files&nbsp;.=&nbsp;"'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader_filebit'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'";'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">free_result</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfiles</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;files</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;next&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">construct_page_nav</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;page</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;perpage</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;countups</span><span style="color: #007700">[</span><span style="color: #DD0000">'ups'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;uploaderfile&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'?'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'&amp;amp;perpage='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;perpage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'&#36;myfiles&nbsp;=&nbsp;"'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader_files'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'";'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'print_output("'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'");'</span><span style="color: #007700">);<br />}<br /><br />elseif&nbsp;(</span><span style="color: #0000BB">&#36;_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">]&nbsp;==&nbsp;</span><span style="color: #DD0000">'editor'</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'print_output("'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader_editor'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'");'</span><span style="color: #007700">);<br />}<br /><br />elseif&nbsp;(</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">]&nbsp;==&nbsp;</span><span style="color: #DD0000">'doupload'</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print_no_permission</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">clean_gpc</span><span style="color: #007700">(</span><span style="color: #DD0000">'f'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'file'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TYPE_ARRAY_FILE</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">clean_gpc</span><span style="color: #007700">(</span><span style="color: #DD0000">'p'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'description'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TYPE_ARRAY_STR</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;erorrs&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;ext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;continueuploading&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;filedescription&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;filerealname&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;countfile&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;extphp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;cheknude&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;phphtmcgihtaccess&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;hacked&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_nude'</span><span style="color: #007700">]&nbsp;AND&nbsp;(</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'usergroupid'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;nude_groups</span><span style="color: #007700">))&nbsp;AND&nbsp;(@</span><span style="color: #0000BB">file_exists</span><span style="color: #007700">(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/includes/class_image_filter.php'</span><span style="color: #007700">)))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">require_once(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/includes/class_image_filter.php'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filter&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">ImageFilter</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;cheknude&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;description</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'description'</span><span style="color: #007700">]&nbsp;AS&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;GPCdescription</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;GPCdescription</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filedescription</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;GPCdescription</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">][</span><span style="color: #DD0000">'name'</span><span style="color: #007700">]&nbsp;AS&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;GPCfilename</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;countfile</span><span style="color: #007700">++;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;GPCfilename</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">strtolower</span><span style="color: #007700">(</span><span style="color: #0000BB">htmlspecialchars_uni</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;GPCfilename</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;((</span><span style="color: #0000BB">&#36;countfile&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">10</span><span style="color: #007700">)&nbsp;OR&nbsp;(</span><span style="color: #0000BB">&#36;countfile&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_many'</span><span style="color: #007700">]))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">'/(.php)|(.htm)|(.pl)|(.cgi)|(.htaccess)/i'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;extcode</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;uploadfilenamen</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;extcode</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;phphtmcgihtaccess&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;phphtmcgihtaccess&nbsp;</span><span style="color: #007700">AND&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;AND&nbsp;!</span><span style="color: #0000BB">can_administer</span><span style="color: #007700">()&nbsp;AND&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'banduploader'</span><span style="color: #007700">]&nbsp;AND&nbsp;!</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">preg_split</span><span style="color: #007700">(</span><span style="color: #DD0000">'#&#092;s*,&#092;s*#s'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">config</span><span style="color: #007700">[</span><span style="color: #DD0000">'SpecialUsers'</span><span style="color: #007700">][</span><span style="color: #DD0000">'undeletableusers'</span><span style="color: #007700">],&nbsp;-</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">PREG_SPLIT_NO_EMPTY</span><span style="color: #007700">)))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;hacked&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">elseif(</span><span style="color: #0000BB">&#36;uploadfilenamen</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;!=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;uploadfilenamen</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">strrchr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">'.'</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filerealname</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">htmlspecialchars_uni</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;GPCfilename</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;==&nbsp;</span><span style="color: #DD0000">'txt'</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">strrev</span><span style="color: #007700">(</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">strrchr</span><span style="color: #007700">(</span><span style="color: #0000BB">strrev</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]),&nbsp;</span><span style="color: #DD0000">'.'</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">))&nbsp;.&nbsp;</span><span style="color: #DD0000">".doc"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filerealname</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">strrev</span><span style="color: #007700">(</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">strrchr</span><span style="color: #007700">(</span><span style="color: #0000BB">strrev</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filerealname</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]),&nbsp;</span><span style="color: #DD0000">'.'</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">))&nbsp;.&nbsp;</span><span style="color: #DD0000">".doc"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=</span><span style="color: #DD0000">'doc'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'digifilename'</span><span style="color: #007700">]&nbsp;AND&nbsp;!</span><span style="color: #0000BB">&#36;uploaderx</span><span style="color: #007700">[</span><span style="color: #DD0000">'digifilename'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TIMENOW&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'.'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&#36;uploadfilename[&#36;id]&nbsp;=&nbsp;preg_replace("/[^a-zA-Z0-9&#092;-_&#092;.]+/",&nbsp;"_",&nbsp;&#36;uploadfilename[&#36;id]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">'&nbsp;'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'sfolder'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'_'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;filedescription</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filedescription</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">htmlspecialchars_uni</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedescription</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;filerealname&nbsp;</span><span style="color: #007700">AS&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;GPCfilename1</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;filerealname&nbsp;</span><span style="color: #007700">AS&nbsp;</span><span style="color: #0000BB">&#36;id2&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;GPCfilename2</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id2</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if((</span><span style="color: #0000BB">&#36;GPCfilename1&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">&#36;GPCfilename2</span><span style="color: #007700">)&nbsp;AND&nbsp;</span><span style="color: #0000BB">&#36;id2&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'����'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;hacked</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"UPDATE&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"user&nbsp;SET&nbsp;usergroupid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'banduploader'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INSERT&nbsp;INTO&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"userban<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(userid,&nbsp;usergroupid,&nbsp;displaygroupid,&nbsp;customtitle,&nbsp;usertitle,&nbsp;adminid,&nbsp;bandate,&nbsp;liftdate,&nbsp;reason)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VALUES<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;("&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'usergroupid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;0,&nbsp;0,&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'usertitle'</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"',&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TIMENOW&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">",&nbsp;0,&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #DD0000">'������&nbsp;������&nbsp;�����'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"')<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">][</span><span style="color: #DD0000">'tmp_name'</span><span style="color: #007700">]&nbsp;AS&nbsp;</span><span style="color: #0000BB">&#36;filetmpname</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">unlink</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filetmpname</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print_no_permission</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">][</span><span style="color: #DD0000">'tmp_name'</span><span style="color: #007700">]&nbsp;AS&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;tmpname</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_php_enable'</span><span style="color: #007700">]&nbsp;AND&nbsp;!</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;typesphp</span><span style="color: #007700">)&nbsp;AND&nbsp;</span><span style="color: #0000BB">is_uploaded_file</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;tmpname</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;content&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">file_read</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;tmpname</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">'/(&lt;&#092;&#092;?(php|^(xml)))|(&lt;&#092;&#092;?[&#092;&#092;s]*(-xml))|(&lt;&#092;&#092;?&#092;&#092;s)/i'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;content</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'php'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">unset(</span><span style="color: #0000BB">&#36;content</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;content2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">=</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">=</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;dirpathh</span><span style="color: #007700">=</span><span style="color: #DD0000">"uploaded"</span><span style="color: #007700">;<br /><br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /> &nbsp; &nbsp; &nbsp;&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">is_uploaded_file</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;tmpname</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'no_file'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">elseif&nbsp;((!</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;types</span><span style="color: #007700">)&nbsp;OR&nbsp;</span><span style="color: #0000BB">&#36;extphp</span><span style="color: #007700">)&nbsp;AND&nbsp;!</span><span style="color: #0000BB">&#36;uploaderx</span><span style="color: #007700">[</span><span style="color: #DD0000">'types_files'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">construct_phrase</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'no_ext_x'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">elseif&nbsp;(</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;array(</span><span style="color: #DD0000">'gif'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'jpeg'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'jpe'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'png'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'bmp'</span><span style="color: #007700">)))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;cheknude</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;filter</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GetScore</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;tmpname</span><span style="color: #007700">)&nbsp;&gt;=&nbsp;</span><span style="color: #0000BB">30</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'����&nbsp;���&nbsp;�����&nbsp;�������'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">][</span><span style="color: #DD0000">'size'</span><span style="color: #007700">]&nbsp;AS&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;tmpsize</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;filesizes</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;tmpsize</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;tmpsize&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'size_none'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">elseif&nbsp;(</span><span style="color: #0000BB">&#36;fileisin&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_first</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT&nbsp;*&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;file_size&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;tmpsize&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;file_name&nbsp;LIKE&nbsp;'%"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"%'"</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_exists'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&lt;br&nbsp;/&gt;&lt;a&nbsp;dir='ltr'&nbsp;href='"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileisin</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"'&nbsp;target='_blank'&gt;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileisin</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&lt;/a&gt;"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;fileisin</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;fileid</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;fileisin</span><span style="color: #007700">[</span><span style="color: #DD0000">'id'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">elseif&nbsp;(</span><span style="color: #0000BB">&#36;tmpsize&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">&#36;size&nbsp;</span><span style="color: #007700">AND&nbsp;!</span><span style="color: #0000BB">&#36;uploaderx</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_size'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">construct_phrase</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'no_size_x'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;sizetmp</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">vb_number_format</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;tmpsize</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">elseif&nbsp;(</span><span style="color: #0000BB">&#36;sizecont&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">&#36;tmpsize&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">&#36;folder_size&nbsp;</span><span style="color: #007700">AND&nbsp;!</span><span style="color: #0000BB">&#36;uploaderx</span><span style="color: #007700">[</span><span style="color: #DD0000">'folder_size'</span><span style="color: #007700">]&nbsp;AND&nbsp;</span><span style="color: #0000BB">&#36;uploaderperm</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploadermaxfoldesize'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'reach_size'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">][</span><span style="color: #DD0000">'tmp_name'</span><span style="color: #007700">]&nbsp;AS&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;filetmpname</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'sfolder'</span><span style="color: #007700">]&nbsp;AND&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternal'</span><span style="color: #007700">]&nbsp;OR&nbsp;!@</span><span style="color: #0000BB">is_dir</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;dirpath</span><span style="color: #007700">)))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;set&nbsp;up&nbsp;basic&nbsp;connection<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;conn_id&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">ftp_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_url'</span><span style="color: #007700">]);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;login&nbsp;with&nbsp;username&nbsp;and&nbsp;password<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_login</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_user'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ismkdir&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!@</span><span style="color: #0000BB">ftp_nlist</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">])&nbsp;AND&nbsp;!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;try&nbsp;to&nbsp;create&nbsp;the&nbsp;directory&nbsp;&#36;dirpath<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_mkdir</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ismkdir&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternal'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_site</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'CHMOD&nbsp;0777&nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;I&nbsp;have't&nbsp;finde&nbsp;any&nbsp;awy&nbsp;to&nbsp;make&nbsp;index.html&nbsp;in&nbsp;an&nbsp;external&nbsp;server<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filehandle&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;dirpath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/index.html'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'wb'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filehandle</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"&#092;n&#092;n"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filehandle</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">elseif(</span><span style="color: #0000BB">&#36;ismkdir</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;file&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'index.html'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;fp&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/includes/index.html'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'rb'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_fput</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;file</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;fp</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FTP_BINARY</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fp</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;close&nbsp;the&nbsp;FTP&nbsp;stream<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_close</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">elseif(!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">mkdir</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;dirpath</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0777</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filehandle&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;dirpath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/index.html'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'wb'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filehandle</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"&#092;n&#092;n"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filehandle</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternal'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;conn_id&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">ftp_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_url'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_login</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_user'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(!@</span><span style="color: #0000BB">ftp_put</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;filetmpname</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FTP_BINARY</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'bad_uploader'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;&lt;a&nbsp;href="sendmessage.php?do=contactus&amp;message='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">construct_phrase</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'contact_us_upload'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bbtitle'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">vb_number_format</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filesizes</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'username'</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'contact_us'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;/a&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"INSERT&nbsp;INTO&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(userid,&nbsp;file_name,&nbsp;file_size,&nbsp;fileurl,&nbsp;dateline,&nbsp;description)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VALUES&nbsp;('"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"','"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filerealname</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"',"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;filesizes</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternalurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"/"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"',"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TIMENOW&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">",&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedescription</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"')"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//@ftp_chmod(&#36;conn_id,&nbsp;0755,&nbsp;&#36;ftppath&nbsp;.&nbsp;&#36;vbulletin-&gt;GPC['file']['name']); &nbsp;not&nbsp;workin&nbsp;cuse&nbsp;the&nbsp;FTP&nbsp;server<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">''&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'done_upload'</span><span style="color: #007700">].&nbsp;</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;&lt;a&nbsp;dir="ltr"&nbsp;href='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternalurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"/"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&nbsp;target="_blank"&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternalurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;/a&gt;&lt;br&nbsp;/&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'no_ext'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternalurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;fileid</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">insert_id</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_close</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{&nbsp;@</span><span style="color: #0000BB">watermark</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;dirpathh</span><span style="color: #007700">.</span><span style="color: #DD0000">"/"</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">,</span><span style="color: #DD0000">'logo/logo.png'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(!@</span><span style="color: #0000BB">move_uploaded_file</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;filetmpname</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">''&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;dirpath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'bad_uploader'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;&lt;a&nbsp;href="sendmessage.php?do=contactus&amp;message='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">construct_phrase</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'contact_us_upload'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bbtitle'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">vb_number_format</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filesizes</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'username'</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'contact_us'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;/a&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"INSERT&nbsp;INTO&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(userid,&nbsp;file_name,&nbsp;file_size,&nbsp;fileurl,&nbsp;dateline,&nbsp;description)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VALUES&nbsp;('"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"','"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filerealname</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"',"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;filesizes</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bburl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"/"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;path&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"','"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TIMENOW&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"',&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedescription</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"')"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">chmod</span><span style="color: #007700">(</span><span style="color: #DD0000">''&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;dirpath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">][</span><span style="color: #DD0000">'name'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0755</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">''&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'done_upload'</span><span style="color: #007700">].&nbsp;</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;&lt;a&nbsp;dir="ltr"&nbsp;href='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;path&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&nbsp;target="_blank"&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bburl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;path&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;/a&gt;&lt;br&nbsp;/&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'no_ext'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bburl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;path&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;fileid</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">insert_id</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">unlink</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filetmpname</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">for(</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">&lt;=&nbsp;</span><span style="color: #0000BB">&#36;countfile</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">++)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msgview</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msgcode</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderreadytag'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'gif'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpe'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'png'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'bmp'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(@</span><span style="color: #0000BB">getimagesize</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;OR&nbsp;!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploadergdcheck'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgview</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'&lt;img&nbsp;src="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;border="0"&nbsp;alt=""&nbsp;/&gt;'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcodef&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'[IMG]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'[/IMG]'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcode</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;msgcodef</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcode</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'[URL="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bburl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;msgcodef&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'[/URL]'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternal'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;conn_id&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">ftp_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_url'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_login</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_user'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if(@</span><span style="color: #0000BB">ftp_delete</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"DELETE&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;fileurl&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_close</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(@</span><span style="color: #0000BB">unlink</span><span style="color: #007700">(</span><span style="color: #DD0000">''&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;dirpath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"DELETE&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;fileurl&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_check_img_failed'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'swf'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;((</span><span style="color: #0000BB">&#36;swfinfo&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">getimagesize</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]))&nbsp;OR&nbsp;!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploadergdcheck'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgview</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'&lt;embed&nbsp;src="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;swfinfo</span><span style="color: #007700">[</span><span style="color: #0000BB">3</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">' &nbsp;quality="high"&nbsp;loop="false"&nbsp;menu="false"&nbsp;TYPE="application/x-shockwave-flash"&nbsp;wmode="transparent" &nbsp;AllowScriptAccess="never"&nbsp;nojava="true"&nbsp;/&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcode</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'[FLASH='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">']width='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;swfinfo</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&nbsp;height='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;swfinfo</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'[/FLASH]'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternal'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;conn_id&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">ftp_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_url'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_login</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_user'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if(@</span><span style="color: #0000BB">ftp_delete</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"DELETE&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;fileurl&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_close</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(@</span><span style="color: #0000BB">unlink</span><span style="color: #007700">(</span><span style="color: #DD0000">''&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;dirpath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"DELETE&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;fileurl&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_check_flash_failed'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rm'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ra'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ram'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'3gp'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rmvb'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgview</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'&lt;embed&nbsp;SRC="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;type="audio/x-pn-realaudio-plugin"&nbsp;CONSOLE="Clip1"&nbsp;CONTROLS="ImageWindow,ControlPanel,StatusBar"&nbsp;HEIGHT="230"&nbsp;WIDTH="300"&nbsp;AUTOSTART="false"&nbsp;AllowScriptAccess="never"&nbsp;nojava="true"&nbsp;/&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcode</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'[RAMV]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'[/RAMV]'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mp3'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wave'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mid'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'avi'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wmv'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'asf'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'dat'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msgview</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'&lt;object&nbsp;width="30%"&nbsp;classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"&nbsp;id="PTMediaPlayer"&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="URL"&nbsp;value="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="rate"&nbsp;value="1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="currentPosition"&nbsp;value="0"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="playCount"&nbsp;value="1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="autoStart"&nbsp;value="0"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="uiMode"&nbsp;value="mini"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="stretchToFit"&nbsp;value="-1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="enableContextMenu"&nbsp;value="-1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/object&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msgcode</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'[MEDIA]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'[/MEDIA]'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;erorr&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'&#36;uploadmsgbit&nbsp;.=&nbsp;"'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader_msgbit'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'";'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'*******'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;upeditor</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'print_output("'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader_editor_msg'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'");'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'print_output("'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader_upload'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'");'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br />}<br /><br />elseif&nbsp;(</span><span style="color: #0000BB">&#36;_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">]&nbsp;==&nbsp;</span><span style="color: #DD0000">'delfile'</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(!(</span><span style="color: #0000BB">&#36;permissions</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderperm'</span><span style="color: #007700">]&nbsp;&amp;&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">bf_ugp</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderperm'</span><span style="color: #007700">][</span><span style="color: #DD0000">'candeluploadedfiles'</span><span style="color: #007700">]))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print_no_permission</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">clean_gpc</span><span style="color: #007700">(</span><span style="color: #DD0000">'r'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'id'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TYPE_INT</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;erorr&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;filedb&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_first</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT&nbsp;fileurl&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;id&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'id'</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #0000BB">standard_error</span><span style="color: #007700">(</span><span style="color: #0000BB">fetch_error</span><span style="color: #007700">(</span><span style="color: #DD0000">'noid'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">'sendmessage.php'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;file&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bburl'</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternal'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;conn_id&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">ftp_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_url'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_login</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_user'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'*******'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(@</span><span style="color: #0000BB">ftp_delete</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;@</span><span style="color: #0000BB">basename</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">])))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"DELETE&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;fileurl&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;erorr&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_close</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">elseif&nbsp;(@</span><span style="color: #0000BB">unlink</span><span style="color: #007700">(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;file</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"DELETE&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;fileurl&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;erorr&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'ajax'</span><span style="color: #007700">]&nbsp;AND&nbsp;!</span><span style="color: #0000BB">&#36;erorr</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;erorr</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'not_delete'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'done_delete'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"&#092;n"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;msg</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">require_once(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/includes/class_xml.php'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;xml&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">vB_AJAX_XML_Builder</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'text/xml'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;xml</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">add_tag</span><span style="color: #007700">(</span><span style="color: #DD0000">'error'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;msg</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;xml</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">print_xml</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">exit;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;erorr</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'not_delete'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'print_output("'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;upeditor&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'_msg'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'");'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'done_delete'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">url&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;uploaderfile&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">iif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;upeditor&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'?do=editor'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #0000BB">print_standard_redirect</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;msg</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br />}<br /><br />elseif&nbsp;(</span><span style="color: #0000BB">&#36;_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">]&nbsp;==&nbsp;</span><span style="color: #DD0000">'details'</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">clean_gpc</span><span style="color: #007700">(</span><span style="color: #DD0000">'r'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'id'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TYPE_INT</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;delit&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;filedb&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_first</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT&nbsp;*&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;id&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'id'</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'id'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">eval(</span><span style="color: #0000BB">standard_error</span><span style="color: #007700">(</span><span style="color: #0000BB">fetch_error</span><span style="color: #007700">(</span><span style="color: #DD0000">'noid'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">'sendmessage.php'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;msg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">iif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'description'</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">'�����:&amp;nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'description'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;ext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">strrchr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">'.'</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;msgview&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;msgcode&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;fileurl&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">];<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderreadytag'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'gif'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpe'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'png'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'bmp'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgview&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;img&nbsp;src="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'"&nbsp;border="0"&nbsp;alt=""&nbsp;/&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcode&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'[IMG]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'[/IMG]'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'swf'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;swfinfo&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">getimagesize</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgview&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;embed&nbsp;src="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'"&nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;swfinfo</span><span style="color: #007700">[</span><span style="color: #0000BB">3</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">' &nbsp;quality="high"&nbsp;loop="false"&nbsp;menu="false"&nbsp;TYPE="application/x-shockwave-flash"&nbsp;wmode="transparent" &nbsp;AllowScriptAccess="never"&nbsp;nojava="true"&nbsp;/&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcode&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'[FLASH='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">']width='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;swfinfo</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&nbsp;height='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;swfinfo</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'[/FLASH]'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rm'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ra'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ram'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'3gp'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rmvb'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgview&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;embed&nbsp;SRC="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'"&nbsp;type="audio/x-pn-realaudio-plugin"&nbsp;CONSOLE="Clip1"&nbsp;CONTROLS="ImageWindow,ControlPanel,StatusBar"&nbsp;HEIGHT="230"&nbsp;WIDTH="300"&nbsp;AUTOSTART="false"&nbsp;AllowScriptAccess="never"&nbsp;nojava="true"&nbsp;/&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcode&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'[RAMV]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'[/RAMV]'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mp3'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wave'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mid'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'avi'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wmv'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'asf'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'dat'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msgview&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;object&nbsp;width="30%"&nbsp;classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"&nbsp;id="PTMediaPlayer"&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="URL"&nbsp;value="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="rate"&nbsp;value="1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="currentPosition"&nbsp;value="0"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="playCount"&nbsp;value="1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="autoStart"&nbsp;value="0"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="uiMode"&nbsp;value="mini"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="stretchToFit"&nbsp;value="-1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="enableContextMenu"&nbsp;value="-1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/object&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msgcode&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'[MEDIA]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'[/MEDIA]'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'print_output("'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;upeditor&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'_msg'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'");'</span><span style="color: #007700">);<br />}<br /></span><span style="color: #FF8000">/*======================================================================*&#092;<br />||&nbsp;####################################################################<br />||&nbsp;#&nbsp;CVS:&nbsp;&#36;RCSfile:&nbsp;uploader.php,v&nbsp;&#36;&nbsp;-&nbsp;&#36;Revision:&nbsp;3.4.5&nbsp;&#36;<br />||&nbsp;####################################################################<br />&#092;*======================================================================*/<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
تحية طيبة<br />
ارجوا من الاخوه الاكارم عموما ومن الاخ Amir_Alzubidy خصوصا مساعدتي في اظافة ختم الصور لملف الرفع هذا<br />
قمت بااظافة دالة ختم الصور لاكن لم يعمل الختم<br />
وهذا الملف مع دالة ختم الصور</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /><br />&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">watermark</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;logo</span><span style="color: #007700">){<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/jpg|jpeg/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromjpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/webp/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromwebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/png/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/gif/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromgif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;(preg_match("/svg/",&#36;ext[id])){&#36;src_img=imagecreatefromsvg(&#36;ss);}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;src_logo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;logo</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bwidth &nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSX</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bheight&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSY</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;lwidth &nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSX</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;lheight&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSY</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//fix&nbsp;bug&nbsp;for&nbsp;1beta3<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(&nbsp;</span><span style="color: #0000BB">&#36;bwidth&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">160&nbsp;</span><span style="color: #007700">&amp;&amp;</span><span style="color: #0000BB"> &nbsp;&#36;bheight&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">130&nbsp;</span><span style="color: #007700">)&nbsp;{<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;src_x&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;bwidth&nbsp;</span><span style="color: #007700">-&nbsp;(</span><span style="color: #0000BB">&#36;lwidth&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;src_y&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;bheight&nbsp;</span><span style="color: #007700">-&nbsp;(</span><span style="color: #0000BB">&#36;lheight&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;ImageAlphaBlending</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;ImageCopy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_x</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_y</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;lwidth</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;lheight</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/jpg|jpeg/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagejpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/png/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagepng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/webp/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagewebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/gif/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagegif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">);}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;(preg_match("/svg/",&#36;ext[id])){imagesvg(&#36;src_img,&nbsp;&#36;ss);}<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">}</span><span style="color: #FF8000">#&nbsp;&lt;&nbsp;150<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">else<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />}<br /></span><span style="color: #FF8000">/*======================================================================*&#092;<br />||&nbsp;####################################################################&nbsp;||<br />||&nbsp;# &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;����&nbsp;���&nbsp;������� &nbsp;uploade&nbsp;v&nbsp;3.4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;#&nbsp;||<br />||&nbsp;# &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for&nbsp;vBulletin&nbsp;Version&nbsp;3.5.x&nbsp;AND&nbsp;3.6.x &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;#&nbsp;||<br />||&nbsp;# &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;http://7beebi.com &nbsp; &nbsp;����&nbsp;����� &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;#&nbsp;||<br />||&nbsp;# &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;webmaster@7beebi.com &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp;||<br />||&nbsp;####################################################################&nbsp;||<br />&#092;*======================================================================*/<br /><br />//&nbsp;########################&nbsp;SET&nbsp;PHP&nbsp;ENVIRONMENT&nbsp;###########################<br /></span><span style="color: #0000BB">error_reporting</span><span style="color: #007700">(</span><span style="color: #0000BB">E_ALL&nbsp;</span><span style="color: #007700">&amp;&nbsp;~</span><span style="color: #0000BB">E_NOTICE</span><span style="color: #007700">);<br />@</span><span style="color: #0000BB">set_time_limit</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'THIS_SCRIPT'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'uploader'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'NOPMPOPUP'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//&nbsp;###################&nbsp;PRE-CACHE&nbsp;TEMPLATES&nbsp;AND&nbsp;DATA&nbsp;######################<br /></span><span style="color: #007700">if&nbsp;(empty(</span><span style="color: #0000BB">&#36;_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">])&nbsp;OR&nbsp;(</span><span style="color: #0000BB">&#36;_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">]&nbsp;==&nbsp;</span><span style="color: #DD0000">'doupload'</span><span style="color: #007700">))<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'main'</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">&#36;phrasegroups&nbsp;</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">'uploader'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;specialtemplates&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /></span><span style="color: #FF8000">//&nbsp;pre-cache&nbsp;templates&nbsp;used&nbsp;by&nbsp;all&nbsp;actions<br /></span><span style="color: #0000BB">&#36;globaltemplates&nbsp;</span><span style="color: #007700">=&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_header'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_footer'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_msg'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_editor_msg'<br /></span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//&nbsp;pre-cache&nbsp;templates&nbsp;used&nbsp;by&nbsp;specific&nbsp;actions<br /></span><span style="color: #0000BB">&#36;actiontemplates&nbsp;</span><span style="color: #007700">=&nbsp;array(<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'main'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_files'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_filebit'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_bit'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_rules'<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">),<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'doupload'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_msgbit'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_upload'</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">),<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'editor'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'uploader_editor'<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">),<br />);<br /><br /></span><span style="color: #FF8000">//&nbsp;#########################&nbsp;REQUIRE&nbsp;BACK-END&nbsp;############################<br /></span><span style="color: #007700">require_once(</span><span style="color: #DD0000">'./global.php'</span><span style="color: #007700">);<br />require_once(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/uploaderglobal.php'</span><span style="color: #007700">);<br />require_once(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/includes/adminfunctions.php'</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;required&nbsp;for&nbsp;can_administer<br /></span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">])<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">config</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader'</span><span style="color: #007700">][</span><span style="color: #DD0000">'password'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">config</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader'</span><span style="color: #007700">][</span><span style="color: #DD0000">'password'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br />}<br /></span><span style="color: #FF8000">//&nbsp;#######################################################################<br />//&nbsp;########################&nbsp;START&nbsp;MAIN&nbsp;SCRIPT&nbsp;############################<br />//&nbsp;#######################################################################<br /><br /></span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">]&nbsp;==&nbsp;</span><span style="color: #DD0000">'main'</span><span style="color: #007700">)<br />{<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">clean_array_gpc</span><span style="color: #007700">(</span><span style="color: #DD0000">'r'</span><span style="color: #007700">,&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'page'</span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">TYPE_INT</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'order'</span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">TYPE_STR</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'ascdesc'</span><span style="color: #0000BB"> &nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">TYPE_STR</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'thumbs'</span><span style="color: #0000BB"> &nbsp;&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">TYPE_BOOL</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'perpage'</span><span style="color: #0000BB"> &nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">TYPE_INT<br /> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">));<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'order'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'name'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;order&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'size'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;order&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'file_size'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">default:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;order&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'dateline'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'ascdesc'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'asc'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ascdesc&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'ASC'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">default:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ascdesc&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'DESC'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;page&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'page'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;thumbs&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'thumbs'</span><span style="color: #007700">];<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'perpage'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;perpage&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'perpage'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;perpage&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'upsperpage'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;perpage&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'upsmaxperpage'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;perpage&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'upsmaxperpage'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;files&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;filesdb&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;countups&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_first</span><span style="color: #007700">(</span><span style="color: #DD0000">"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SELECT&nbsp;COUNT(*)&nbsp;AS&nbsp;ups<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;AS&nbsp;uploader<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;countups</span><span style="color: #007700">[</span><span style="color: #DD0000">'ups'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;page&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;page&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else&nbsp;if&nbsp;(</span><span style="color: #0000BB">&#36;page&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">ceil</span><span style="color: #007700">((</span><span style="color: #0000BB">&#36;countups</span><span style="color: #007700">[</span><span style="color: #DD0000">'ups'</span><span style="color: #007700">]&nbsp;+&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;/&nbsp;</span><span style="color: #0000BB">&#36;perpage</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;page&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">ceil</span><span style="color: #007700">((</span><span style="color: #0000BB">&#36;countups</span><span style="color: #007700">[</span><span style="color: #DD0000">'ups'</span><span style="color: #007700">]&nbsp;+&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;/&nbsp;</span><span style="color: #0000BB">&#36;perpage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;limitlower&nbsp;</span><span style="color: #007700">=&nbsp;(</span><span style="color: #0000BB">&#36;page&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;*&nbsp;</span><span style="color: #0000BB">&#36;perpage</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;userfiles&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_read</span><span style="color: #007700">(</span><span style="color: #DD0000">"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;SELECT&nbsp;*<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;ORDER&nbsp;BY&nbsp;</span><span style="color: #0000BB">&#36;order</span><span style="color: #DD0000">&nbsp;</span><span style="color: #0000BB">&#36;ascdesc</span><span style="color: #DD0000"><br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;LIMIT&nbsp;</span><span style="color: #0000BB">&#36;limitlower</span><span style="color: #DD0000">,&nbsp;</span><span style="color: #0000BB">&#36;perpage</span><span style="color: #DD0000"><br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">while&nbsp;(</span><span style="color: #0000BB">&#36;userfile&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfiles</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;bgclass&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">exec_switch_bg</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">/*<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(&#36;filesdb)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filesdb&nbsp;=&nbsp;&#36;userfile['file_name'];<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filesdb&nbsp;.=&nbsp;',&nbsp;'&nbsp;.&nbsp;&#36;userfile['file_name'];<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">strrchr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">'.'</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'gif'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpe'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'png'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'bmp'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;extimg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'images/uploadericon/img.gif'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;handelext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rm'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ra'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ram'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'3gp'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rmvb'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;extimg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'images/uploadericon/real.gif'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;handelext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mp3'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wave'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mid'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'avi'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wmv'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'asf'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'dat'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;extimg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'images/uploadericon/media.gif'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;handelext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'zip'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'gz'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'tar'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;extimg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'images/uploadericon/zip.gif'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;handelext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">default:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;extname&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;handelext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(@</span><span style="color: #0000BB">file_exists</span><span style="color: #007700">(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/images/uploadericon/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ext&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'.gif'</span><span style="color: #007700">)&nbsp;AND&nbsp;!</span><span style="color: #0000BB">&#36;handelext</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;extimg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'images/uploadericon/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ext&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'.gif'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">elseif(!</span><span style="color: #0000BB">&#36;handelext</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;extimg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'images/uploadericon/unknow.gif'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'thumbs'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'gif'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpe'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'png'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'bmp'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;a&nbsp;href="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;target="_blank"&nbsp;title="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'description'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&gt;&lt;img&nbsp;src="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;width="160"&nbsp;height="160"&nbsp;border="0"&nbsp;alt=""&nbsp;/&gt;&lt;/a&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'swf'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;embed&nbsp;src="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'" &nbsp;width="160"&nbsp;height="160"&nbsp;quality="high"&nbsp;loop="false"&nbsp;menu="false"&nbsp;TYPE="application/x-shockwave-flash"&nbsp;wmode="transparent"&nbsp;AllowScriptAccess="never"&nbsp;nojava="true"&nbsp;/&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rm'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ra'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ram'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'3gp'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rmvb'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;embed&nbsp;SRC="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;type="audio/x-pn-realaudio-plugin"&nbsp;CONSOLE="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'id'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;CONTROLS="ImageWindow,ControlPanel,StatusBar"&nbsp;width="160"&nbsp;height="160"&nbsp;AUTOSTART="false"&nbsp;AllowScriptAccess="never"&nbsp;nojava="true"&nbsp;/&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mp3'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wave'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mid'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'avi'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wmv'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'asf'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'dat'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;object&nbsp;width="160"&nbsp;height="160"&nbsp;classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"&nbsp;id="PTMediaPlayer"&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="URL"&nbsp;value="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="rate"&nbsp;value="1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="currentPosition"&nbsp;value="0"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="playCount"&nbsp;value="1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="autoStart"&nbsp;value="0"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="uiMode"&nbsp;value="mini"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="stretchToFit"&nbsp;value="-1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;param&nbsp;name="enableContextMenu"&nbsp;value="-1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;/object&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">default:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">iif</span><span style="color: #007700">(</span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">])&nbsp;&gt;&nbsp;</span><span style="color: #0000BB">30&nbsp;</span><span style="color: #007700">,</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">30</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"..."</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;a&nbsp;href="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;target="_blank"&nbsp;title="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'description'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;/a&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">iif</span><span style="color: #007700">(</span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">])&nbsp;&gt;&nbsp;</span><span style="color: #0000BB">50&nbsp;</span><span style="color: #007700">,</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">30</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"..."</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;a&nbsp;href="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;target="_blank"&nbsp;title="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'description'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;/a&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'dateline'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">vbdate</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'dateformat'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'dateline'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_size'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">vb_number_format</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfile</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_size'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'&#36;files&nbsp;.=&nbsp;"'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader_filebit'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'";'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">free_result</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userfiles</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;files</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;next&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">construct_page_nav</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;page</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;perpage</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;countups</span><span style="color: #007700">[</span><span style="color: #DD0000">'ups'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;uploaderfile&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'?'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'&amp;amp;perpage='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;perpage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'&#36;myfiles&nbsp;=&nbsp;"'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader_files'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'";'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'print_output("'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'");'</span><span style="color: #007700">);<br />}<br /><br />elseif&nbsp;(</span><span style="color: #0000BB">&#36;_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">]&nbsp;==&nbsp;</span><span style="color: #DD0000">'editor'</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'print_output("'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader_editor'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'");'</span><span style="color: #007700">);<br />}<br /><br />elseif&nbsp;(</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">]&nbsp;==&nbsp;</span><span style="color: #DD0000">'doupload'</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print_no_permission</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">clean_gpc</span><span style="color: #007700">(</span><span style="color: #DD0000">'f'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'file'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TYPE_ARRAY_FILE</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">clean_gpc</span><span style="color: #007700">(</span><span style="color: #DD0000">'p'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'description'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TYPE_ARRAY_STR</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;erorrs&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;ext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;continueuploading&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;filedescription&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;filerealname&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;countfile&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;extphp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;cheknude&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;phphtmcgihtaccess&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;hacked&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_nude'</span><span style="color: #007700">]&nbsp;AND&nbsp;(</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'usergroupid'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;nude_groups</span><span style="color: #007700">))&nbsp;AND&nbsp;(@</span><span style="color: #0000BB">file_exists</span><span style="color: #007700">(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/includes/class_image_filter.php'</span><span style="color: #007700">)))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">require_once(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/includes/class_image_filter.php'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filter&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">ImageFilter</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;cheknude&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;description</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'description'</span><span style="color: #007700">]&nbsp;AS&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;GPCdescription</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;GPCdescription</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filedescription</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;GPCdescription</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">][</span><span style="color: #DD0000">'name'</span><span style="color: #007700">]&nbsp;AS&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;GPCfilename</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;countfile</span><span style="color: #007700">++;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;GPCfilename</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">strtolower</span><span style="color: #007700">(</span><span style="color: #0000BB">htmlspecialchars_uni</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;GPCfilename</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;((</span><span style="color: #0000BB">&#36;countfile&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">10</span><span style="color: #007700">)&nbsp;OR&nbsp;(</span><span style="color: #0000BB">&#36;countfile&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_many'</span><span style="color: #007700">]))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">'/(.php)|(.htm)|(.pl)|(.cgi)|(.htaccess)/i'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;extcode</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;uploadfilenamen</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;extcode</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;phphtmcgihtaccess&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;phphtmcgihtaccess&nbsp;</span><span style="color: #007700">AND&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;AND&nbsp;!</span><span style="color: #0000BB">can_administer</span><span style="color: #007700">()&nbsp;AND&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'banduploader'</span><span style="color: #007700">]&nbsp;AND&nbsp;!</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">preg_split</span><span style="color: #007700">(</span><span style="color: #DD0000">'#&#092;s*,&#092;s*#s'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">config</span><span style="color: #007700">[</span><span style="color: #DD0000">'SpecialUsers'</span><span style="color: #007700">][</span><span style="color: #DD0000">'undeletableusers'</span><span style="color: #007700">],&nbsp;-</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">PREG_SPLIT_NO_EMPTY</span><span style="color: #007700">)))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;hacked&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">elseif(</span><span style="color: #0000BB">&#36;uploadfilenamen</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;!=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;uploadfilenamen</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">strrchr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">'.'</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filerealname</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">htmlspecialchars_uni</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;GPCfilename</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;==&nbsp;</span><span style="color: #DD0000">'txt'</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">strrev</span><span style="color: #007700">(</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">strrchr</span><span style="color: #007700">(</span><span style="color: #0000BB">strrev</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]),&nbsp;</span><span style="color: #DD0000">'.'</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">))&nbsp;.&nbsp;</span><span style="color: #DD0000">".doc"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filerealname</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">strrev</span><span style="color: #007700">(</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">strrchr</span><span style="color: #007700">(</span><span style="color: #0000BB">strrev</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filerealname</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]),&nbsp;</span><span style="color: #DD0000">'.'</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">))&nbsp;.&nbsp;</span><span style="color: #DD0000">".doc"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=</span><span style="color: #DD0000">'doc'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'digifilename'</span><span style="color: #007700">]&nbsp;AND&nbsp;!</span><span style="color: #0000BB">&#36;uploaderx</span><span style="color: #007700">[</span><span style="color: #DD0000">'digifilename'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TIMENOW&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'.'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&#36;uploadfilename[&#36;id]&nbsp;=&nbsp;preg_replace("/[^a-zA-Z0-9&#092;-_&#092;.]+/",&nbsp;"_",&nbsp;&#36;uploadfilename[&#36;id]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">'&nbsp;'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'sfolder'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'_'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;filedescription</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filedescription</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">htmlspecialchars_uni</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedescription</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;filerealname&nbsp;</span><span style="color: #007700">AS&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;GPCfilename1</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;filerealname&nbsp;</span><span style="color: #007700">AS&nbsp;</span><span style="color: #0000BB">&#36;id2&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;GPCfilename2</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id2</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if((</span><span style="color: #0000BB">&#36;GPCfilename1&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">&#36;GPCfilename2</span><span style="color: #007700">)&nbsp;AND&nbsp;</span><span style="color: #0000BB">&#36;id2&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'����'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;hacked</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"UPDATE&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"user&nbsp;SET&nbsp;usergroupid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'banduploader'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;INSERT&nbsp;INTO&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"userban<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(userid,&nbsp;usergroupid,&nbsp;displaygroupid,&nbsp;customtitle,&nbsp;usertitle,&nbsp;adminid,&nbsp;bandate,&nbsp;liftdate,&nbsp;reason)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VALUES<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;("&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'usergroupid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;0,&nbsp;0,&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'usertitle'</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"',&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TIMENOW&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">",&nbsp;0,&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #DD0000">'������&nbsp;������&nbsp;�����'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"')<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">][</span><span style="color: #DD0000">'tmp_name'</span><span style="color: #007700">]&nbsp;AS&nbsp;</span><span style="color: #0000BB">&#36;filetmpname</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">unlink</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filetmpname</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print_no_permission</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">][</span><span style="color: #DD0000">'tmp_name'</span><span style="color: #007700">]&nbsp;AS&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;tmpname</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_php_enable'</span><span style="color: #007700">]&nbsp;AND&nbsp;!</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;typesphp</span><span style="color: #007700">)&nbsp;AND&nbsp;</span><span style="color: #0000BB">is_uploaded_file</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;tmpname</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;content&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">file_read</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;tmpname</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">'/(&lt;&#092;&#092;?(php|^(xml)))|(&lt;&#092;&#092;?[&#092;&#092;s]*(-xml))|(&lt;&#092;&#092;?&#092;&#092;s)/i'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;content</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'php'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">unset(</span><span style="color: #0000BB">&#36;content</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;content2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">=</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">=</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;dirpathh</span><span style="color: #007700">=</span><span style="color: #DD0000">"uploaded"</span><span style="color: #007700">;<br /><br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br /> &nbsp; &nbsp; &nbsp;&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">is_uploaded_file</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;tmpname</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'no_file'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">elseif&nbsp;((!</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;types</span><span style="color: #007700">)&nbsp;OR&nbsp;</span><span style="color: #0000BB">&#36;extphp</span><span style="color: #007700">)&nbsp;AND&nbsp;!</span><span style="color: #0000BB">&#36;uploaderx</span><span style="color: #007700">[</span><span style="color: #DD0000">'types_files'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">construct_phrase</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'no_ext_x'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">elseif&nbsp;(</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;array(</span><span style="color: #DD0000">'gif'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'jpeg'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'jpe'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'png'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'bmp'</span><span style="color: #007700">)))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;cheknude</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;filter</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GetScore</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;tmpname</span><span style="color: #007700">)&nbsp;&gt;=&nbsp;</span><span style="color: #0000BB">30</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'����&nbsp;���&nbsp;�����&nbsp;�������'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">][</span><span style="color: #DD0000">'size'</span><span style="color: #007700">]&nbsp;AS&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;tmpsize</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;filesizes</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;tmpsize</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;tmpsize&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'size_none'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">elseif&nbsp;(</span><span style="color: #0000BB">&#36;fileisin&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_first</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT&nbsp;*&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;file_size&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;tmpsize&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;file_name&nbsp;LIKE&nbsp;'%"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"%'"</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_exists'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&lt;br&nbsp;/&gt;&lt;a&nbsp;dir='ltr'&nbsp;href='"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileisin</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"'&nbsp;target='_blank'&gt;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileisin</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&lt;/a&gt;"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;fileisin</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;fileid</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;fileisin</span><span style="color: #007700">[</span><span style="color: #DD0000">'id'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">elseif&nbsp;(</span><span style="color: #0000BB">&#36;tmpsize&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">&#36;size&nbsp;</span><span style="color: #007700">AND&nbsp;!</span><span style="color: #0000BB">&#36;uploaderx</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_size'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">construct_phrase</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'no_size_x'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;sizetmp</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">vb_number_format</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;tmpsize</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">elseif&nbsp;(</span><span style="color: #0000BB">&#36;sizecont&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">&#36;tmpsize&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">&#36;folder_size&nbsp;</span><span style="color: #007700">AND&nbsp;!</span><span style="color: #0000BB">&#36;uploaderx</span><span style="color: #007700">[</span><span style="color: #DD0000">'folder_size'</span><span style="color: #007700">]&nbsp;AND&nbsp;</span><span style="color: #0000BB">&#36;uploaderperm</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploadermaxfoldesize'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'reach_size'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">][</span><span style="color: #DD0000">'tmp_name'</span><span style="color: #007700">]&nbsp;AS&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;filetmpname</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">&#36;continueuploading</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'sfolder'</span><span style="color: #007700">]&nbsp;AND&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternal'</span><span style="color: #007700">]&nbsp;OR&nbsp;!@</span><span style="color: #0000BB">is_dir</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;dirpath</span><span style="color: #007700">)))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;set&nbsp;up&nbsp;basic&nbsp;connection<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;conn_id&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">ftp_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_url'</span><span style="color: #007700">]);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;login&nbsp;with&nbsp;username&nbsp;and&nbsp;password<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_login</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_user'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ismkdir&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!@</span><span style="color: #0000BB">ftp_nlist</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">])&nbsp;AND&nbsp;!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;try&nbsp;to&nbsp;create&nbsp;the&nbsp;directory&nbsp;&#36;dirpath<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_mkdir</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ismkdir&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternal'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_site</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'CHMOD&nbsp;0777&nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;I&nbsp;have't&nbsp;finde&nbsp;any&nbsp;awy&nbsp;to&nbsp;make&nbsp;index.html&nbsp;in&nbsp;an&nbsp;external&nbsp;server<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filehandle&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;dirpath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/index.html'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'wb'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filehandle</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"&#092;n&#092;n"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filehandle</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">elseif(</span><span style="color: #0000BB">&#36;ismkdir</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;file&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'index.html'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;fp&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/includes/index.html'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'rb'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_fput</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;file</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;fp</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FTP_BINARY</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fp</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;close&nbsp;the&nbsp;FTP&nbsp;stream<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_close</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">elseif(!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">mkdir</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;dirpath</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0777</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filehandle&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;dirpath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/index.html'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'wb'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filehandle</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"&#092;n&#092;n"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filehandle</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternal'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;conn_id&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">ftp_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_url'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_login</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_user'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(!@</span><span style="color: #0000BB">ftp_put</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;filetmpname</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">FTP_BINARY</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'bad_uploader'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;&lt;a&nbsp;href="sendmessage.php?do=contactus&amp;message='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">construct_phrase</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'contact_us_upload'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bbtitle'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">vb_number_format</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filesizes</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'username'</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'contact_us'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;/a&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"INSERT&nbsp;INTO&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(userid,&nbsp;file_name,&nbsp;file_size,&nbsp;fileurl,&nbsp;dateline,&nbsp;description)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VALUES&nbsp;('"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"','"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filerealname</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"',"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;filesizes</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternalurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"/"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"',"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TIMENOW&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">",&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedescription</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"')"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//@ftp_chmod(&#36;conn_id,&nbsp;0755,&nbsp;&#36;ftppath&nbsp;.&nbsp;&#36;vbulletin-&gt;GPC['file']['name']); &nbsp;not&nbsp;workin&nbsp;cuse&nbsp;the&nbsp;FTP&nbsp;server<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">''&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'done_upload'</span><span style="color: #007700">].&nbsp;</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;&lt;a&nbsp;dir="ltr"&nbsp;href='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternalurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"/"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&nbsp;target="_blank"&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternalurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;/a&gt;&lt;br&nbsp;/&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'no_ext'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternalurl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;fileid</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">insert_id</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_close</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{&nbsp;@</span><span style="color: #0000BB">watermark</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;dirpathh</span><span style="color: #007700">.</span><span style="color: #DD0000">"/"</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;ss</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;sss</span><span style="color: #007700">,</span><span style="color: #DD0000">'logo/logo.png'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(!@</span><span style="color: #0000BB">move_uploaded_file</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;filetmpname</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">''&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;dirpath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'bad_uploader'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;&lt;a&nbsp;href="sendmessage.php?do=contactus&amp;message='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">construct_phrase</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'contact_us_upload'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bbtitle'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">vb_number_format</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filesizes</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'username'</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'contact_us'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;/a&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"INSERT&nbsp;INTO&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(userid,&nbsp;file_name,&nbsp;file_size,&nbsp;fileurl,&nbsp;dateline,&nbsp;description)<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VALUES&nbsp;('"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"','"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filerealname</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"',"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;filesizes</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">",'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bburl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"/"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;path&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"','"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TIMENOW&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"',&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedescription</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"')"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">chmod</span><span style="color: #007700">(</span><span style="color: #DD0000">''&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;dirpath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">][</span><span style="color: #DD0000">'name'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0755</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">''&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'done_upload'</span><span style="color: #007700">].&nbsp;</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;&lt;a&nbsp;dir="ltr"&nbsp;href='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;path&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&nbsp;target="_blank"&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bburl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;path&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&lt;/a&gt;&lt;br&nbsp;/&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'no_ext'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bburl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;path&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;fileid</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">insert_id</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">unlink</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filetmpname</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">for(</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">&#36;id&nbsp;</span><span style="color: #007700">&lt;=&nbsp;</span><span style="color: #0000BB">&#36;countfile</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">++)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msgview</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msgcode</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderreadytag'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'gif'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpe'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'png'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'bmp'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(@</span><span style="color: #0000BB">getimagesize</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;OR&nbsp;!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploadergdcheck'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgview</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'&lt;img&nbsp;src="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;border="0"&nbsp;alt=""&nbsp;/&gt;'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcodef&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'[IMG]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'[/IMG]'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcode</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;msgcodef</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcode</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'[URL="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bburl'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;msgcodef&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'[/URL]'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternal'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;conn_id&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">ftp_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_url'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_login</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_user'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if(@</span><span style="color: #0000BB">ftp_delete</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"DELETE&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;fileurl&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_close</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(@</span><span style="color: #0000BB">unlink</span><span style="color: #007700">(</span><span style="color: #DD0000">''&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;dirpath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"DELETE&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;fileurl&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_check_img_failed'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'swf'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;((</span><span style="color: #0000BB">&#36;swfinfo&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">getimagesize</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]))&nbsp;OR&nbsp;!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploadergdcheck'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgview</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'&lt;embed&nbsp;src="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;swfinfo</span><span style="color: #007700">[</span><span style="color: #0000BB">3</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">' &nbsp;quality="high"&nbsp;loop="false"&nbsp;menu="false"&nbsp;TYPE="application/x-shockwave-flash"&nbsp;wmode="transparent" &nbsp;AllowScriptAccess="never"&nbsp;nojava="true"&nbsp;/&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcode</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'[FLASH='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">']width='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;swfinfo</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&nbsp;height='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;swfinfo</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'[/FLASH]'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternal'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;conn_id&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">ftp_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_url'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_login</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_user'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if(@</span><span style="color: #0000BB">ftp_delete</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"DELETE&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;fileurl&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_close</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(@</span><span style="color: #0000BB">unlink</span><span style="color: #007700">(</span><span style="color: #DD0000">''&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;dirpath&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;uploadfilename</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"DELETE&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;fileurl&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msg</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_check_flash_failed'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rm'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ra'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ram'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'3gp'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rmvb'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgview</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'&lt;embed&nbsp;SRC="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;type="audio/x-pn-realaudio-plugin"&nbsp;CONSOLE="Clip1"&nbsp;CONTROLS="ImageWindow,ControlPanel,StatusBar"&nbsp;HEIGHT="230"&nbsp;WIDTH="300"&nbsp;AUTOSTART="false"&nbsp;AllowScriptAccess="never"&nbsp;nojava="true"&nbsp;/&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcode</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'[RAMV]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'[/RAMV]'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mp3'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wave'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mid'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'avi'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wmv'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'asf'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'dat'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msgview</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'&lt;object&nbsp;width="30%"&nbsp;classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"&nbsp;id="PTMediaPlayer"&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="URL"&nbsp;value="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="rate"&nbsp;value="1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="currentPosition"&nbsp;value="0"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="playCount"&nbsp;value="1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="autoStart"&nbsp;value="0"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="uiMode"&nbsp;value="mini"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="stretchToFit"&nbsp;value="-1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="enableContextMenu"&nbsp;value="-1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/object&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msgcode</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'[MEDIA]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'[/MEDIA]'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;erorr&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;erorrs</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;id</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'&#36;uploadmsgbit&nbsp;.=&nbsp;"'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader_msgbit'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'";'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'*******'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;upeditor</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'print_output("'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader_editor_msg'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'");'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'print_output("'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader_upload'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'");'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br />}<br /><br />elseif&nbsp;(</span><span style="color: #0000BB">&#36;_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">]&nbsp;==&nbsp;</span><span style="color: #DD0000">'delfile'</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(!(</span><span style="color: #0000BB">&#36;permissions</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderperm'</span><span style="color: #007700">]&nbsp;&amp;&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">bf_ugp</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderperm'</span><span style="color: #007700">][</span><span style="color: #DD0000">'candeluploadedfiles'</span><span style="color: #007700">]))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print_no_permission</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">clean_gpc</span><span style="color: #007700">(</span><span style="color: #DD0000">'r'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'id'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TYPE_INT</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;erorr&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;filedb&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_first</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT&nbsp;fileurl&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;id&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'id'</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #0000BB">standard_error</span><span style="color: #007700">(</span><span style="color: #0000BB">fetch_error</span><span style="color: #007700">(</span><span style="color: #DD0000">'noid'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">'sendmessage.php'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;file&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bburl'</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">]);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderexternal'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;conn_id&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">ftp_connect</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_url'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_login</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_user'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploader_ftp_password'</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #DD0000">'*******'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(@</span><span style="color: #0000BB">ftp_delete</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ftppath&nbsp;</span><span style="color: #007700">.&nbsp;@</span><span style="color: #0000BB">basename</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">])))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"DELETE&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;fileurl&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;erorr&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">ftp_close</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;conn_id</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">elseif&nbsp;(@</span><span style="color: #0000BB">unlink</span><span style="color: #007700">(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;file</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #DD0000">"DELETE&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;fileurl&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;erorr&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'ajax'</span><span style="color: #007700">]&nbsp;AND&nbsp;!</span><span style="color: #0000BB">&#36;erorr</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;erorr</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'not_delete'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'done_delete'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">'&lt;br&nbsp;/&gt;'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"&#092;n"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;msg</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">require_once(</span><span style="color: #0000BB">DIR&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/includes/class_xml.php'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;xml&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">vB_AJAX_XML_Builder</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'text/xml'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;xml</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">add_tag</span><span style="color: #007700">(</span><span style="color: #DD0000">'error'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;msg</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;xml</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">print_xml</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">exit;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;erorr</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'not_delete'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'print_output("'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;upeditor&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'_msg'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'");'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'done_delete'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">url&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;uploaderfile&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">iif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;upeditor&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'?do=editor'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">eval(</span><span style="color: #0000BB">print_standard_redirect</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;msg</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br />}<br /><br />elseif&nbsp;(</span><span style="color: #0000BB">&#36;_REQUEST</span><span style="color: #007700">[</span><span style="color: #DD0000">'do'</span><span style="color: #007700">]&nbsp;==&nbsp;</span><span style="color: #DD0000">'details'</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">clean_gpc</span><span style="color: #007700">(</span><span style="color: #DD0000">'r'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'id'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TYPE_INT</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;delit&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;filedb&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_first</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT&nbsp;*&nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"uploader&nbsp;WHERE&nbsp;userid&nbsp;=&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">userinfo</span><span style="color: #007700">[</span><span style="color: #DD0000">'userid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">"&nbsp;AND&nbsp;id&nbsp;=&nbsp;'"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">GPC</span><span style="color: #007700">[</span><span style="color: #DD0000">'id'</span><span style="color: #007700">])&nbsp;.&nbsp;</span><span style="color: #DD0000">"'"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'id'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">eval(</span><span style="color: #0000BB">standard_error</span><span style="color: #007700">(</span><span style="color: #0000BB">fetch_error</span><span style="color: #007700">(</span><span style="color: #DD0000">'noid'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;vbphrase</span><span style="color: #007700">[</span><span style="color: #DD0000">'file'</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">'sendmessage.php'</span><span style="color: #007700">)));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;msg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">iif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'description'</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">'�����:&amp;nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'description'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;ext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">strrchr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'file_name'</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">'.'</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;msgview&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;msgcode&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&#36;fileurl&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;filedb</span><span style="color: #007700">[</span><span style="color: #DD0000">'fileurl'</span><span style="color: #007700">];<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'uploaderreadytag'</span><span style="color: #007700">])<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">{<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;ext</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'gif'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'jpe'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'png'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'bmp'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgview&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;img&nbsp;src="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'"&nbsp;border="0"&nbsp;alt=""&nbsp;/&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcode&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'[IMG]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'[/IMG]'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'swf'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;swfinfo&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">getimagesize</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileurl</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgview&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;embed&nbsp;src="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'"&nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;swfinfo</span><span style="color: #007700">[</span><span style="color: #0000BB">3</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">' &nbsp;quality="high"&nbsp;loop="false"&nbsp;menu="false"&nbsp;TYPE="application/x-shockwave-flash"&nbsp;wmode="transparent" &nbsp;AllowScriptAccess="never"&nbsp;nojava="true"&nbsp;/&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcode&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'[FLASH='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">']width='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;swfinfo</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'&nbsp;height='&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;swfinfo</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'[/FLASH]'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rm'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ra'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'ram'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'3gp'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'rmvb'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgview&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;embed&nbsp;SRC="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'"&nbsp;type="audio/x-pn-realaudio-plugin"&nbsp;CONSOLE="Clip1"&nbsp;CONTROLS="ImageWindow,ControlPanel,StatusBar"&nbsp;HEIGHT="230"&nbsp;WIDTH="300"&nbsp;AUTOSTART="false"&nbsp;AllowScriptAccess="never"&nbsp;nojava="true"&nbsp;/&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&#36;msgcode&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'[RAMV]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'[/RAMV]'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">break;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mp3'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mpeg'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wave'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'mid'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'avi'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'wmv'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'asf'</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">'dat'</span><span style="color: #007700">:<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msgview&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'&lt;object&nbsp;width="30%"&nbsp;classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"&nbsp;id="PTMediaPlayer"&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="URL"&nbsp;value="'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="rate"&nbsp;value="1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="currentPosition"&nbsp;value="0"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="playCount"&nbsp;value="1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="autoStart"&nbsp;value="0"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="uiMode"&nbsp;value="mini"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="stretchToFit"&nbsp;value="-1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;param&nbsp;name="enableContextMenu"&nbsp;value="-1"&nbsp;/&gt;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/object&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;msgcode&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'[MEDIA]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;fileurl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'[/MEDIA]'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">eval(</span><span style="color: #DD0000">'print_output("'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">fetch_template</span><span style="color: #007700">(</span><span style="color: #DD0000">'uploader'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;upeditor&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'_msg'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'");'</span><span style="color: #007700">);<br />}<br /></span><span style="color: #FF8000">/*======================================================================*&#092;<br />||&nbsp;####################################################################<br />||&nbsp;#&nbsp;CVS:&nbsp;&#36;RCSfile:&nbsp;uploader.php,v&nbsp;&#36;&nbsp;-&nbsp;&#36;Revision:&nbsp;3.4.5&nbsp;&#36;<br />||&nbsp;####################################################################<br />&#092;*======================================================================*/<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[اريد تنسيق جدول هذه الصفحه]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56230</link>
			<pubDate>Thu, 16 Apr 2026 11:21:42 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=49603">nnnjk</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56230</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
طورت سكربت اوقات الصلاة الشهري<br />
لاكن الجدول غير منسق هذا الكود</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">@</span><span style="color: #0000BB">ini_set</span><span style="color: #007700">(</span><span style="color: #DD0000">'display_errors'</span><span style="color: #007700">,</span><span style="color: #DD0000">"0"</span><span style="color: #007700">);<br />@</span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">'Content-type:&nbsp;text/html;charset=windows-1256'</span><span style="color: #007700">);<br />include(</span><span style="color: #DD0000">'functions_hijridate.php'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;yearss</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">hdate</span><span style="color: #007700">(</span><span style="color: #DD0000">'_D&nbsp;_d&nbsp;_M&nbsp;_Y&nbsp;-h:i&nbsp;A'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;w1</span><span style="color: #007700">=</span><span style="color: #DD0000">"PM"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;w2</span><span style="color: #007700">=</span><span style="color: #DD0000">"مساء"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;w3</span><span style="color: #007700">=</span><span style="color: #DD0000">"AM"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;w4</span><span style="color: #007700">=</span><span style="color: #DD0000">"صباحا"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;yearss&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;w1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;w2</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;yearss</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;yearss&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;w3</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;w4</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;yearss</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//&#36;string&nbsp;=&nbsp;"AM,PM";<br />//&#36;str&nbsp;=&nbsp;array("AM"&nbsp;=&gt;&nbsp;"صباحا");<br />//&#36;st2&nbsp;=&nbsp;array("PM"&nbsp;=&gt;&nbsp;"مساء");<br />//&#36;yearss&nbsp;=&nbsp;strtr(&#36;string,&nbsp;&#36;str);<br /></span><span style="color: #0000BB">echo &nbsp;&#36;yearss</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//require("functions_hijridate.php"); <br />//ArDate.class.php<br />//hijri.class.php<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Prayer&nbsp;Times&nbsp;Calculator,&nbsp;Sample&nbsp;Usage<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;By:&nbsp;Hamid&nbsp;Zarrabi-Zadeh<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Inputs&nbsp;:&nbsp;&#36;method,&nbsp;&#36;year,&nbsp;&#36;latitude,&nbsp;&#36;longitude,&nbsp;&#36;timeZone<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">extract</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">,</span><span style="color: #0000BB">EXTR_PREFIX_ALL</span><span style="color: #007700">,</span><span style="color: #DD0000">'p'</span><span style="color: #007700">);&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//extract(&#36;_POST['method'];,&nbsp;EXTR_PREFIX_ALL,'p');&nbsp;<br />//import_request_variables("p");<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">include(</span><span style="color: #DD0000">'PrayTime.php'</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//extract(&#36;request);<br /></span><span style="color: #0000BB">extract</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//extract(("p")&#36;post);<br /></span><span style="color: #0000BB">extract</span><span style="color: #007700">((</span><span style="color: #DD0000">'array'</span><span style="color: #007700">),</span><span style="color: #0000BB">&#36;post</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">extract</span><span style="color: #007700">((</span><span style="color: #DD0000">'array'</span><span style="color: #007700">),</span><span style="color: #0000BB">&#36;method</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;soo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y'</span><span style="color: #007700">);<br />if&nbsp;(!isset(</span><span style="color: #0000BB">&#36;method</span><span style="color: #007700">)&nbsp;||&nbsp;!isset(</span><span style="color: #0000BB">&#36;year</span><span style="color: #007700">))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list(</span><span style="color: #0000BB">&#36;method</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;year</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;latitude</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;longitude</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;timeZone</span><span style="color: #007700">)&nbsp;=&nbsp;array(</span><span style="color: #0000BB">4</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;soo</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">24.633333</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">46.716667</span><span style="color: #007700">,</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;<br /></span>&lt;html&gt;<br />&lt;head&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;اوقات&nbsp;الصلاة&nbsp;الرياض&lt;/title&gt;<br />&lt;/head&gt;<br />&lt;style&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;pre&nbsp;{font-family:&nbsp;courier,&nbsp;serif,&nbsp;size:&nbsp;10pt;&nbsp;margin:&nbsp;0px&nbsp;8px;}<br />.header&nbsp;{&nbsp;font-family:&nbsp;'Open&nbsp;Sans',&nbsp;sans-serif;&nbsp;font-weight:&nbsp;50;&nbsp;letter-spacing:&nbsp;.14em;&nbsp;line-height:&nbsp;1em;&nbsp;color:&nbsp;#3333;&nbsp;font-style:&nbsp;normal;&nbsp;font-size:&nbsp;50px;&nbsp;text-transform:&nbsp;uppercase;&nbsp;}<br />&lt;/style&gt;<br /><br />&lt;body&gt;<br /><br />&lt;h1&gt;&lt;/h1&gt;<br />&lt;form&nbsp;name="form"&nbsp;method="post"&nbsp;action="<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;PHP_SELF&nbsp;?&gt;</span>"&gt;<br />&lt;div&nbsp;style="padding:10px;&nbsp;background-color:&nbsp;#F8F7F4;&nbsp;border:&nbsp;1px&nbsp;dashed&nbsp;#EAE9CD;"&gt;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;Latitude:&nbsp;&lt;input&nbsp;type="text"&nbsp;value="<span style="color: #0000BB">&lt;?php&nbsp;echo &nbsp;&#36;latitude</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">?&gt;</span>"&nbsp;name="latitude"&nbsp;size="4"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;Longitude:&nbsp;&lt;input&nbsp;type="text"&nbsp;value="<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;longitude</span><span style="color: #007700">;</span><span style="color: #0000BB">?&gt;</span>"&nbsp;name="longitude"&nbsp;size="4"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;Time&nbsp;Zone:&nbsp;&lt;input&nbsp;type="text"&nbsp;value="<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;timeZone</span><span style="color: #007700">;</span><span style="color: #0000BB">?&gt;</span>"&nbsp;name="timeZone"&nbsp;size="2"&gt;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;Year:&nbsp;&lt;input&nbsp;type="text"&nbsp;value="<span style="color: #0000BB">&lt;?php&nbsp;echo &nbsp;&#36;year</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">?&gt;</span>"&nbsp;name="year"&nbsp;size="4"&gt;<br />&nbsp;&lt;br&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;Method:&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;select&nbsp;id="method"&nbsp;name="method"&nbsp;size="1"&nbsp;onchange="document.form.submit()"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option&nbsp;value="0"&gt;Shia&nbsp;Ithna-Ashari&lt;/option&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option&nbsp;value="1"&gt;University&nbsp;of&nbsp;Islamic&nbsp;Sciences,&nbsp;Karachi&lt;/option&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option&nbsp;value="2"&gt;Islamic&nbsp;Society&nbsp;of&nbsp;North&nbsp;America&nbsp;(ISNA)&lt;/option&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option&nbsp;value="3"&gt;Muslim&nbsp;World&nbsp;League&nbsp;(MWL)&lt;/option&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option&nbsp;value="4"&gt;Umm&nbsp;al-Qura,&nbsp;Makkah&lt;/option&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option&nbsp;value="5"&gt;Egyptian&nbsp;General&nbsp;Authority&nbsp;of&nbsp;Survey&lt;/option&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option&nbsp;value="7"&gt;Institute&nbsp;of&nbsp;Geophysics,&nbsp;University&nbsp;of&nbsp;Tehran&lt;/option&gt;<br />&nbsp;&lt;/select&gt;<br />&nbsp;&lt;select&nbsp;id="method" &nbsp;name="months"&gt;<br />&nbsp;<span style="color: #0000BB">&lt;?php&nbsp;&#36;months</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">"January"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"1"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"February"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"2"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"March"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"3"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"April"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"4"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"May"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"5"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"June"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"6"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"July"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"7"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"August"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"8"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"September"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"9"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"October"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"10"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"November"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"11"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"December"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"12"</span><span style="color: #007700">);<br />foreach&nbsp;(</span><span style="color: #0000BB">&#36;months&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">&#36;key&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">)&nbsp;{&nbsp;</span><span style="color: #0000BB">?&gt;<br /></span>&nbsp;&lt;option&nbsp;value="<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">?&gt;</span>"&gt;<br /><span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;key</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">?&gt;<br /></span>&lt;/option&gt;<br />&nbsp;<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">}&nbsp;</span><span style="color: #0000BB">?&gt;</span>&nbsp;&lt;/select&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input&nbsp;type="submit"&nbsp;value="Make&nbsp;Timetable"&gt;<br />&lt;/div&gt;<br />&lt;/form&gt;<br /><br />&lt;pre&gt;<br />Date &nbsp;&nbsp;arabdate &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;Fajr &nbsp;&nbsp;Sunrise &nbsp;Dhuhr &nbsp; &nbsp;Asr &nbsp;&nbsp;Sunset &nbsp;Maghrib &nbsp;Isha&nbsp;<br />-------------------------------------------------------------<br /><span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">/*&#36;prayTime&nbsp;=&nbsp;new&nbsp;PrayTime(&#36;method);<br />&nbsp;&nbsp;&nbsp;&nbsp;&#36;date&nbsp;=&nbsp;strtotime(&#36;year.&nbsp;'m&nbsp;d');<br />&nbsp;&nbsp;&nbsp;&nbsp;&#36;endDate&nbsp;=&nbsp;strtotime((&#36;year)."+&#36;dd&nbsp;days");<br />//extract((array)&#36;method);<br />//extract(&#36;method,&nbsp;EXTR_PREFIX_ALL,'p');&nbsp;<br />//extract((array)&#36;post);<br />//strtotime((&#36;year+&nbsp;1).&nbsp;'-1-1');<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;while&nbsp;(&#36;date&nbsp;&lt;&nbsp;&#36;endDate)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&#36;times&nbsp;=&nbsp;&#36;prayTime-&gt;getPrayerTimes(&#36;date,&nbsp;&#36;latitude,&nbsp;&#36;longitude,&nbsp;&#36;timeZone);<br />&nbsp;&nbsp;&nbsp;&nbsp;&#36;day&nbsp;=&nbsp;hdate('M&nbsp;d&nbsp;_D&nbsp;_j&nbsp;_F',&nbsp;&#36;date);<br />//&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;&#36;day.&nbsp;"&#092;t".&nbsp;implode("&#092;t",&nbsp;&#36;times).&nbsp;"&#092;n";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;date&nbsp;+=&nbsp;24*60*60; &nbsp;//&nbsp;next&nbsp;day<br />&nbsp;&nbsp;&nbsp;&nbsp;}*/<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;?&gt;<br /></span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000BB">&lt;?php<br />&nbsp;&#36;inputMonth&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'months'</span><span style="color: #007700">];<br />&nbsp;</span><span style="color: #0000BB">&#36;year&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'year'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;sooo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'m'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;soooo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y'</span><span style="color: #007700">);<br />if&nbsp;(</span><span style="color: #0000BB">&#36;inputMonth</span><span style="color: #007700">==</span><span style="color: #DD0000">""</span><span style="color: #007700">){</span><span style="color: #0000BB">&#36;inputMonth</span><span style="color: #007700">=</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;sooo</span><span style="color: #DD0000">"</span><span style="color: #007700">;}else{</span><span style="color: #0000BB">&#36;inputMonth</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'months'</span><span style="color: #007700">];}<br />if&nbsp;(</span><span style="color: #0000BB">&#36;year</span><span style="color: #007700">==</span><span style="color: #DD0000">""</span><span style="color: #007700">){</span><span style="color: #0000BB">&#36;year</span><span style="color: #007700">=</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;soooo</span><span style="color: #DD0000">"</span><span style="color: #007700">;}else{</span><span style="color: #0000BB">&#36;year</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'year'</span><span style="color: #007700">];}<br /></span><span style="color: #FF8000">//&#36;months&nbsp;=&nbsp;preg_replace('1','03',&#36;months);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;(isset(&#36;_GET['month'])){ &nbsp; &nbsp; &nbsp;<br />// &nbsp; &nbsp;&#36;inputMonth=&#36;_GET['month'];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;mkt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mktime</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;inputMonth</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;year</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;date2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;year</span><span style="color: #DD0000">-m-d"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;mkt</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;end2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;year&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"-"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;inputMonth&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"-"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'t'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;date2</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;datess&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"'.</span><span style="color: #0000BB">&#36;inputMonth</span><span style="color: #DD0000">.'&nbsp;d&nbsp;</span><span style="color: #0000BB">&#36;year</span><span style="color: #DD0000">"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;?&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&lt;style&nbsp;type="text/css"&gt;<br /> &nbsp;table&nbsp;{<br /> &nbsp; &nbsp;width:&nbsp;80%;<br /> &nbsp; &nbsp;border-collapse:&nbsp;collapse;<br /> &nbsp;}<br /> &nbsp;th,&nbsp;td&nbsp;{<br /> &nbsp; &nbsp;border:&nbsp;1px&nbsp;solid&nbsp;#1565c0;<br /> &nbsp; &nbsp;padding:&nbsp;3px;<br /> &nbsp;}<br /> &nbsp;th&nbsp;{<br /> &nbsp; &nbsp;background:&nbsp;#f3f3f3;<br /> &nbsp;}<br /> &nbsp;caption&nbsp;{<br /> &nbsp; &nbsp;padding:&nbsp;7px;<br /> &nbsp; &nbsp;background:&nbsp;#fafafa;<br /> &nbsp; &nbsp;caption-side:&nbsp;top;<br /> &nbsp;}<br />&lt;/style&gt;&lt;table&gt;<br />&nbsp;&lt;tr&gt;<br /> &nbsp;<span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /></span><span style="color: #FF8000">/*elseif&nbsp;(&#36;days&nbsp;!==&nbsp;hdate('m&nbsp;d&nbsp;_D&nbsp;_j&nbsp;_F',&nbsp;&#36;mkt));&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;class&nbsp;=&nbsp;"pre";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}*/<br /><br />//extract(("p")&#36;post);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">while&nbsp;(</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;date2</span><span style="color: #007700">)&nbsp;&lt;=&nbsp;</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;end2</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;times&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;prayTime</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getPrayerTimes</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;mkt</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;latitude</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;longitude</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;timeZone</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;days</span><span style="color: #007700">=</span><span style="color: #0000BB">hdate</span><span style="color: #007700">(</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;inputMonth</span><span style="color: #DD0000">&nbsp;d&nbsp;_D&nbsp;_j&nbsp;_F&nbsp;_Y"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;mkt</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">/*&#36;days&nbsp;=&nbsp;hdate(''.&#36;inputMonth.'&nbsp;d&nbsp;_D&nbsp;_j&nbsp;_F',&nbsp;&#36;mkt);*/<br />//&#36;class&nbsp;=&nbsp;'';<br /></span><span style="color: #0000BB">&#36;datees1</span><span style="color: #007700">=</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'d&nbsp;m&nbsp;Y'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;datees</span><span style="color: #007700">=</span><span style="color: #DD0000">'&lt;span&nbsp;class="header"&gt;'</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;datees</span><span style="color: #007700">.</span><span style="color: #DD0000">'&lt;/span&gt;'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">&#36;class&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">&#36;datees1&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">hdate</span><span style="color: #007700">(</span><span style="color: #DD0000">"d&nbsp;m&nbsp;Y"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;mkt</span><span style="color: #007700">))&nbsp;{<br /></span><span style="color: #0000BB">&#36;days</span><span style="color: #007700">=</span><span style="color: #DD0000">'&lt;font&nbsp;color="red"&gt;'</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;days</span><span style="color: #007700">.</span><span style="color: #DD0000">'&lt;/font&gt;'</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;&nbsp;&nbsp;&nbsp;&#36;class&nbsp;=&nbsp;"header";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">}&nbsp;elseif&nbsp;(</span><span style="color: #0000BB">&#36;datees&nbsp;</span><span style="color: #007700">!==&nbsp;</span><span style="color: #0000BB">hdate</span><span style="color: #007700">(</span><span style="color: #DD0000">"d&nbsp;m"</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;class&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"current"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<br />print&nbsp;</span><span style="color: #0000BB">&#36;days</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&#092;t"</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">implode</span><span style="color: #007700">(</span><span style="color: #DD0000">"&#092;t"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;times</span><span style="color: #007700">).&nbsp;</span><span style="color: #DD0000">"&#092;n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;mkt&nbsp;</span><span style="color: #007700">+=&nbsp;</span><span style="color: #0000BB">24</span><span style="color: #007700">*</span><span style="color: #0000BB">60</span><span style="color: #007700">*</span><span style="color: #0000BB">60</span><span style="color: #007700">;</span><span style="color: #0000BB"> &nbsp;</span><span style="color: #FF8000">//&nbsp;next&nbsp;day<br /></span><span style="color: #0000BB">&#36;datees&nbsp;</span><span style="color: #007700">+=&nbsp;</span><span style="color: #0000BB">24</span><span style="color: #007700">*</span><span style="color: #0000BB">60</span><span style="color: #007700">*</span><span style="color: #0000BB">60</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;day_num&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'d'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;date2</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;day_name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'l'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;date2</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;date2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">"Y-m-d"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"+1&nbsp;day"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;date2</span><span style="color: #007700">)));<br />&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;td&gt;</span><span style="color: #0000BB">&#36;day_numm</span><span style="color: #DD0000">&nbsp;&lt;br/&gt;&nbsp;</span><span style="color: #0000BB">&#36;day_namme</span><span style="color: #DD0000">&lt;/td&gt;"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}</span><span style="color: #FF8000">//&nbsp;end&nbsp;while&nbsp;<br /></span><span style="color: #0000BB"> &nbsp;?&gt;<br /></span>&nbsp;&lt;/tr&gt;<br />&nbsp;&lt;/table&gt;<br />&nbsp;<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;}&nbsp;//end&nbsp;if&nbsp;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;?&gt;<br /></span> &nbsp; &nbsp;&lt;/body&gt;<br />&lt;/html&gt;<br />&lt;/pre&gt;<br /><br />&lt;script&nbsp;type="text/javascript"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;method&nbsp;=&nbsp;<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;method&nbsp;?&gt;</span>;<br />&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById('method').selectedIndex&nbsp;=&nbsp;Math.min(method,&nbsp;6);<br /><br />&lt;/script&gt;<br /><br />&lt;/body&gt;<br />&lt;/html&gt;&nbsp;<br /></code></div></div></div><div style="text-align: center;" class="mycode_align">انظروا الى  الصورة</div><br />
<br />
<img src="https://vb4arb.com/vb/images/attachtypes/image.gif" title="PNG Image" border="0" alt=".png" />
&nbsp;&nbsp;<a class="attachembed" href="attachment.php?aid=30179" target="_blank" title="">Screenshot_٢٠٢٦-٠٤-١٦-١٤-١٢-٠٦.png</a> (الحجم : 394.12 ك ب / التحميلات : 22)
]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
طورت سكربت اوقات الصلاة الشهري<br />
لاكن الجدول غير منسق هذا الكود</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">@</span><span style="color: #0000BB">ini_set</span><span style="color: #007700">(</span><span style="color: #DD0000">'display_errors'</span><span style="color: #007700">,</span><span style="color: #DD0000">"0"</span><span style="color: #007700">);<br />@</span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">'Content-type:&nbsp;text/html;charset=windows-1256'</span><span style="color: #007700">);<br />include(</span><span style="color: #DD0000">'functions_hijridate.php'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;yearss</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">hdate</span><span style="color: #007700">(</span><span style="color: #DD0000">'_D&nbsp;_d&nbsp;_M&nbsp;_Y&nbsp;-h:i&nbsp;A'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;w1</span><span style="color: #007700">=</span><span style="color: #DD0000">"PM"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;w2</span><span style="color: #007700">=</span><span style="color: #DD0000">"مساء"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;w3</span><span style="color: #007700">=</span><span style="color: #DD0000">"AM"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;w4</span><span style="color: #007700">=</span><span style="color: #DD0000">"صباحا"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;yearss&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;w1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;w2</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;yearss</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;yearss&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;w3</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;w4</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;yearss</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//&#36;string&nbsp;=&nbsp;"AM,PM";<br />//&#36;str&nbsp;=&nbsp;array("AM"&nbsp;=&gt;&nbsp;"صباحا");<br />//&#36;st2&nbsp;=&nbsp;array("PM"&nbsp;=&gt;&nbsp;"مساء");<br />//&#36;yearss&nbsp;=&nbsp;strtr(&#36;string,&nbsp;&#36;str);<br /></span><span style="color: #0000BB">echo &nbsp;&#36;yearss</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//require("functions_hijridate.php"); <br />//ArDate.class.php<br />//hijri.class.php<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Prayer&nbsp;Times&nbsp;Calculator,&nbsp;Sample&nbsp;Usage<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;By:&nbsp;Hamid&nbsp;Zarrabi-Zadeh<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Inputs&nbsp;:&nbsp;&#36;method,&nbsp;&#36;year,&nbsp;&#36;latitude,&nbsp;&#36;longitude,&nbsp;&#36;timeZone<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">extract</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">,</span><span style="color: #0000BB">EXTR_PREFIX_ALL</span><span style="color: #007700">,</span><span style="color: #DD0000">'p'</span><span style="color: #007700">);&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//extract(&#36;_POST['method'];,&nbsp;EXTR_PREFIX_ALL,'p');&nbsp;<br />//import_request_variables("p");<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">include(</span><span style="color: #DD0000">'PrayTime.php'</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//extract(&#36;request);<br /></span><span style="color: #0000BB">extract</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//extract(("p")&#36;post);<br /></span><span style="color: #0000BB">extract</span><span style="color: #007700">((</span><span style="color: #DD0000">'array'</span><span style="color: #007700">),</span><span style="color: #0000BB">&#36;post</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">extract</span><span style="color: #007700">((</span><span style="color: #DD0000">'array'</span><span style="color: #007700">),</span><span style="color: #0000BB">&#36;method</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;soo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y'</span><span style="color: #007700">);<br />if&nbsp;(!isset(</span><span style="color: #0000BB">&#36;method</span><span style="color: #007700">)&nbsp;||&nbsp;!isset(</span><span style="color: #0000BB">&#36;year</span><span style="color: #007700">))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list(</span><span style="color: #0000BB">&#36;method</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;year</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;latitude</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;longitude</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;timeZone</span><span style="color: #007700">)&nbsp;=&nbsp;array(</span><span style="color: #0000BB">4</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;soo</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">24.633333</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">46.716667</span><span style="color: #007700">,</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;<br /></span>&lt;html&gt;<br />&lt;head&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;اوقات&nbsp;الصلاة&nbsp;الرياض&lt;/title&gt;<br />&lt;/head&gt;<br />&lt;style&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;pre&nbsp;{font-family:&nbsp;courier,&nbsp;serif,&nbsp;size:&nbsp;10pt;&nbsp;margin:&nbsp;0px&nbsp;8px;}<br />.header&nbsp;{&nbsp;font-family:&nbsp;'Open&nbsp;Sans',&nbsp;sans-serif;&nbsp;font-weight:&nbsp;50;&nbsp;letter-spacing:&nbsp;.14em;&nbsp;line-height:&nbsp;1em;&nbsp;color:&nbsp;#3333;&nbsp;font-style:&nbsp;normal;&nbsp;font-size:&nbsp;50px;&nbsp;text-transform:&nbsp;uppercase;&nbsp;}<br />&lt;/style&gt;<br /><br />&lt;body&gt;<br /><br />&lt;h1&gt;&lt;/h1&gt;<br />&lt;form&nbsp;name="form"&nbsp;method="post"&nbsp;action="<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;PHP_SELF&nbsp;?&gt;</span>"&gt;<br />&lt;div&nbsp;style="padding:10px;&nbsp;background-color:&nbsp;#F8F7F4;&nbsp;border:&nbsp;1px&nbsp;dashed&nbsp;#EAE9CD;"&gt;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;Latitude:&nbsp;&lt;input&nbsp;type="text"&nbsp;value="<span style="color: #0000BB">&lt;?php&nbsp;echo &nbsp;&#36;latitude</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">?&gt;</span>"&nbsp;name="latitude"&nbsp;size="4"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;Longitude:&nbsp;&lt;input&nbsp;type="text"&nbsp;value="<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;longitude</span><span style="color: #007700">;</span><span style="color: #0000BB">?&gt;</span>"&nbsp;name="longitude"&nbsp;size="4"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;Time&nbsp;Zone:&nbsp;&lt;input&nbsp;type="text"&nbsp;value="<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;timeZone</span><span style="color: #007700">;</span><span style="color: #0000BB">?&gt;</span>"&nbsp;name="timeZone"&nbsp;size="2"&gt;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;Year:&nbsp;&lt;input&nbsp;type="text"&nbsp;value="<span style="color: #0000BB">&lt;?php&nbsp;echo &nbsp;&#36;year</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">?&gt;</span>"&nbsp;name="year"&nbsp;size="4"&gt;<br />&nbsp;&lt;br&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;Method:&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;select&nbsp;id="method"&nbsp;name="method"&nbsp;size="1"&nbsp;onchange="document.form.submit()"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option&nbsp;value="0"&gt;Shia&nbsp;Ithna-Ashari&lt;/option&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option&nbsp;value="1"&gt;University&nbsp;of&nbsp;Islamic&nbsp;Sciences,&nbsp;Karachi&lt;/option&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option&nbsp;value="2"&gt;Islamic&nbsp;Society&nbsp;of&nbsp;North&nbsp;America&nbsp;(ISNA)&lt;/option&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option&nbsp;value="3"&gt;Muslim&nbsp;World&nbsp;League&nbsp;(MWL)&lt;/option&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option&nbsp;value="4"&gt;Umm&nbsp;al-Qura,&nbsp;Makkah&lt;/option&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option&nbsp;value="5"&gt;Egyptian&nbsp;General&nbsp;Authority&nbsp;of&nbsp;Survey&lt;/option&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option&nbsp;value="7"&gt;Institute&nbsp;of&nbsp;Geophysics,&nbsp;University&nbsp;of&nbsp;Tehran&lt;/option&gt;<br />&nbsp;&lt;/select&gt;<br />&nbsp;&lt;select&nbsp;id="method" &nbsp;name="months"&gt;<br />&nbsp;<span style="color: #0000BB">&lt;?php&nbsp;&#36;months</span><span style="color: #007700">=&nbsp;array(</span><span style="color: #DD0000">"January"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"1"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"February"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"2"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"March"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"3"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"April"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"4"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"May"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"5"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"June"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"6"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"July"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"7"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"August"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"8"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"September"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"9"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"October"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"10"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"November"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"11"</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"December"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"12"</span><span style="color: #007700">);<br />foreach&nbsp;(</span><span style="color: #0000BB">&#36;months&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">&#36;key&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">)&nbsp;{&nbsp;</span><span style="color: #0000BB">?&gt;<br /></span>&nbsp;&lt;option&nbsp;value="<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">?&gt;</span>"&gt;<br /><span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;key</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">?&gt;<br /></span>&lt;/option&gt;<br />&nbsp;<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">}&nbsp;</span><span style="color: #0000BB">?&gt;</span>&nbsp;&lt;/select&gt;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input&nbsp;type="submit"&nbsp;value="Make&nbsp;Timetable"&gt;<br />&lt;/div&gt;<br />&lt;/form&gt;<br /><br />&lt;pre&gt;<br />Date &nbsp;&nbsp;arabdate &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;Fajr &nbsp;&nbsp;Sunrise &nbsp;Dhuhr &nbsp; &nbsp;Asr &nbsp;&nbsp;Sunset &nbsp;Maghrib &nbsp;Isha&nbsp;<br />-------------------------------------------------------------<br /><span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">/*&#36;prayTime&nbsp;=&nbsp;new&nbsp;PrayTime(&#36;method);<br />&nbsp;&nbsp;&nbsp;&nbsp;&#36;date&nbsp;=&nbsp;strtotime(&#36;year.&nbsp;'m&nbsp;d');<br />&nbsp;&nbsp;&nbsp;&nbsp;&#36;endDate&nbsp;=&nbsp;strtotime((&#36;year)."+&#36;dd&nbsp;days");<br />//extract((array)&#36;method);<br />//extract(&#36;method,&nbsp;EXTR_PREFIX_ALL,'p');&nbsp;<br />//extract((array)&#36;post);<br />//strtotime((&#36;year+&nbsp;1).&nbsp;'-1-1');<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;while&nbsp;(&#36;date&nbsp;&lt;&nbsp;&#36;endDate)<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&#36;times&nbsp;=&nbsp;&#36;prayTime-&gt;getPrayerTimes(&#36;date,&nbsp;&#36;latitude,&nbsp;&#36;longitude,&nbsp;&#36;timeZone);<br />&nbsp;&nbsp;&nbsp;&nbsp;&#36;day&nbsp;=&nbsp;hdate('M&nbsp;d&nbsp;_D&nbsp;_j&nbsp;_F',&nbsp;&#36;date);<br />//&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;&#36;day.&nbsp;"&#092;t".&nbsp;implode("&#092;t",&nbsp;&#36;times).&nbsp;"&#092;n";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;date&nbsp;+=&nbsp;24*60*60; &nbsp;//&nbsp;next&nbsp;day<br />&nbsp;&nbsp;&nbsp;&nbsp;}*/<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;?&gt;<br /></span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000BB">&lt;?php<br />&nbsp;&#36;inputMonth&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'months'</span><span style="color: #007700">];<br />&nbsp;</span><span style="color: #0000BB">&#36;year&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'year'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;sooo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'m'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;soooo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y'</span><span style="color: #007700">);<br />if&nbsp;(</span><span style="color: #0000BB">&#36;inputMonth</span><span style="color: #007700">==</span><span style="color: #DD0000">""</span><span style="color: #007700">){</span><span style="color: #0000BB">&#36;inputMonth</span><span style="color: #007700">=</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;sooo</span><span style="color: #DD0000">"</span><span style="color: #007700">;}else{</span><span style="color: #0000BB">&#36;inputMonth</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'months'</span><span style="color: #007700">];}<br />if&nbsp;(</span><span style="color: #0000BB">&#36;year</span><span style="color: #007700">==</span><span style="color: #DD0000">""</span><span style="color: #007700">){</span><span style="color: #0000BB">&#36;year</span><span style="color: #007700">=</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;soooo</span><span style="color: #DD0000">"</span><span style="color: #007700">;}else{</span><span style="color: #0000BB">&#36;year</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_POST</span><span style="color: #007700">[</span><span style="color: #DD0000">'year'</span><span style="color: #007700">];}<br /></span><span style="color: #FF8000">//&#36;months&nbsp;=&nbsp;preg_replace('1','03',&#36;months);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;if&nbsp;(isset(&#36;_GET['month'])){ &nbsp; &nbsp; &nbsp;<br />// &nbsp; &nbsp;&#36;inputMonth=&#36;_GET['month'];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;mkt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mktime</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;inputMonth</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;year</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;date2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;year</span><span style="color: #DD0000">-m-d"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;mkt</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;end2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;year&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"-"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;inputMonth&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"-"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'t'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;date2</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;datess&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"'.</span><span style="color: #0000BB">&#36;inputMonth</span><span style="color: #DD0000">.'&nbsp;d&nbsp;</span><span style="color: #0000BB">&#36;year</span><span style="color: #DD0000">"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;?&gt;</span>&nbsp;&nbsp;&nbsp;&nbsp;&lt;style&nbsp;type="text/css"&gt;<br /> &nbsp;table&nbsp;{<br /> &nbsp; &nbsp;width:&nbsp;80%;<br /> &nbsp; &nbsp;border-collapse:&nbsp;collapse;<br /> &nbsp;}<br /> &nbsp;th,&nbsp;td&nbsp;{<br /> &nbsp; &nbsp;border:&nbsp;1px&nbsp;solid&nbsp;#1565c0;<br /> &nbsp; &nbsp;padding:&nbsp;3px;<br /> &nbsp;}<br /> &nbsp;th&nbsp;{<br /> &nbsp; &nbsp;background:&nbsp;#f3f3f3;<br /> &nbsp;}<br /> &nbsp;caption&nbsp;{<br /> &nbsp; &nbsp;padding:&nbsp;7px;<br /> &nbsp; &nbsp;background:&nbsp;#fafafa;<br /> &nbsp; &nbsp;caption-side:&nbsp;top;<br /> &nbsp;}<br />&lt;/style&gt;&lt;table&gt;<br />&nbsp;&lt;tr&gt;<br /> &nbsp;<span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /></span><span style="color: #FF8000">/*elseif&nbsp;(&#36;days&nbsp;!==&nbsp;hdate('m&nbsp;d&nbsp;_D&nbsp;_j&nbsp;_F',&nbsp;&#36;mkt));&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#36;class&nbsp;=&nbsp;"pre";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}*/<br /><br />//extract(("p")&#36;post);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">while&nbsp;(</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;date2</span><span style="color: #007700">)&nbsp;&lt;=&nbsp;</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;end2</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;times&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;prayTime</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getPrayerTimes</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;mkt</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;latitude</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;longitude</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;timeZone</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;days</span><span style="color: #007700">=</span><span style="color: #0000BB">hdate</span><span style="color: #007700">(</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;inputMonth</span><span style="color: #DD0000">&nbsp;d&nbsp;_D&nbsp;_j&nbsp;_F&nbsp;_Y"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;mkt</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">/*&#36;days&nbsp;=&nbsp;hdate(''.&#36;inputMonth.'&nbsp;d&nbsp;_D&nbsp;_j&nbsp;_F',&nbsp;&#36;mkt);*/<br />//&#36;class&nbsp;=&nbsp;'';<br /></span><span style="color: #0000BB">&#36;datees1</span><span style="color: #007700">=</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'d&nbsp;m&nbsp;Y'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;datees</span><span style="color: #007700">=</span><span style="color: #DD0000">'&lt;span&nbsp;class="header"&gt;'</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;datees</span><span style="color: #007700">.</span><span style="color: #DD0000">'&lt;/span&gt;'</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">&#36;class&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">&#36;datees1&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">hdate</span><span style="color: #007700">(</span><span style="color: #DD0000">"d&nbsp;m&nbsp;Y"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;mkt</span><span style="color: #007700">))&nbsp;{<br /></span><span style="color: #0000BB">&#36;days</span><span style="color: #007700">=</span><span style="color: #DD0000">'&lt;font&nbsp;color="red"&gt;'</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;days</span><span style="color: #007700">.</span><span style="color: #DD0000">'&lt;/font&gt;'</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;&nbsp;&nbsp;&nbsp;&#36;class&nbsp;=&nbsp;"header";<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">}&nbsp;elseif&nbsp;(</span><span style="color: #0000BB">&#36;datees&nbsp;</span><span style="color: #007700">!==&nbsp;</span><span style="color: #0000BB">hdate</span><span style="color: #007700">(</span><span style="color: #DD0000">"d&nbsp;m"</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;class&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"current"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;<br />print&nbsp;</span><span style="color: #0000BB">&#36;days</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&#092;t"</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">implode</span><span style="color: #007700">(</span><span style="color: #DD0000">"&#092;t"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;times</span><span style="color: #007700">).&nbsp;</span><span style="color: #DD0000">"&#092;n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;mkt&nbsp;</span><span style="color: #007700">+=&nbsp;</span><span style="color: #0000BB">24</span><span style="color: #007700">*</span><span style="color: #0000BB">60</span><span style="color: #007700">*</span><span style="color: #0000BB">60</span><span style="color: #007700">;</span><span style="color: #0000BB"> &nbsp;</span><span style="color: #FF8000">//&nbsp;next&nbsp;day<br /></span><span style="color: #0000BB">&#36;datees&nbsp;</span><span style="color: #007700">+=&nbsp;</span><span style="color: #0000BB">24</span><span style="color: #007700">*</span><span style="color: #0000BB">60</span><span style="color: #007700">*</span><span style="color: #0000BB">60</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;day_num&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'d'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;date2</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;day_name&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'l'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;date2</span><span style="color: #007700">));<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;date2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">"Y-m-d"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #DD0000">"+1&nbsp;day"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">strtotime</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;date2</span><span style="color: #007700">)));<br />&nbsp;echo&nbsp;</span><span style="color: #DD0000">"&lt;td&gt;</span><span style="color: #0000BB">&#36;day_numm</span><span style="color: #DD0000">&nbsp;&lt;br/&gt;&nbsp;</span><span style="color: #0000BB">&#36;day_namme</span><span style="color: #DD0000">&lt;/td&gt;"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}</span><span style="color: #FF8000">//&nbsp;end&nbsp;while&nbsp;<br /></span><span style="color: #0000BB"> &nbsp;?&gt;<br /></span>&nbsp;&lt;/tr&gt;<br />&nbsp;&lt;/table&gt;<br />&nbsp;<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;}&nbsp;//end&nbsp;if&nbsp;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;?&gt;<br /></span> &nbsp; &nbsp;&lt;/body&gt;<br />&lt;/html&gt;<br />&lt;/pre&gt;<br /><br />&lt;script&nbsp;type="text/javascript"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;method&nbsp;=&nbsp;<span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">&#36;method&nbsp;?&gt;</span>;<br />&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById('method').selectedIndex&nbsp;=&nbsp;Math.min(method,&nbsp;6);<br /><br />&lt;/script&gt;<br /><br />&lt;/body&gt;<br />&lt;/html&gt;&nbsp;<br /></code></div></div></div><div style="text-align: center;" class="mycode_align">انظروا الى  الصورة</div><br />
<br />
<img src="https://vb4arb.com/vb/images/attachtypes/image.gif" title="PNG Image" border="0" alt=".png" />
&nbsp;&nbsp;<a class="attachembed" href="attachment.php?aid=30179" target="_blank" title="">Screenshot_٢٠٢٦-٠٤-١٦-١٤-١٢-٠٦.png</a> (الحجم : 394.12 ك ب / التحميلات : 22)
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[اريد متغير استبدال كلمتين بكلمتين كلا على حده]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56224</link>
			<pubDate>Sat, 11 Apr 2026 19:51:57 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=49603">nnnjk</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56224</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
اريد من الاخوه الاعزاء متغير استبدال كلمتين بكلمتين مثلا</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;word</span><span style="color: #007700">=</span><span style="color: #DD0000">"hello&nbsp;ahmed"</span><span style="color: #007700">;&nbsp;<br /></span></code></div></div></div>استبدال hello بكلمة welcome<br />
واستبدال ahmed بكلمة mohammed<br />
هذا الكود يستبدل كلمة واحدة بكلمة واحده<br />
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;yearss</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">hdate</span><span style="color: #007700">(</span><span style="color: #DD0000">'_D_d_M_Y-h:i&nbsp;A'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;w1</span><span style="color: #007700">=</span><span style="color: #DD0000">"PM"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;w2</span><span style="color: #007700">=</span><span style="color: #DD0000">"مساء"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;yearss&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;w1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;w2</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;yearss</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>وهذا الكود ماعرفت اعدل عليه<br />
<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code>&#36;string = "AM,PM";<br />
&#36;str = array((("AM" =&gt; "صباحا"),"PM" =&gt; "مساء"));<br />
&#36;yearss = strtr(&#36;string, &#36;str);</code></div></div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
اريد من الاخوه الاعزاء متغير استبدال كلمتين بكلمتين مثلا</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;word</span><span style="color: #007700">=</span><span style="color: #DD0000">"hello&nbsp;ahmed"</span><span style="color: #007700">;&nbsp;<br /></span></code></div></div></div>استبدال hello بكلمة welcome<br />
واستبدال ahmed بكلمة mohammed<br />
هذا الكود يستبدل كلمة واحدة بكلمة واحده<br />
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;yearss</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">hdate</span><span style="color: #007700">(</span><span style="color: #DD0000">'_D_d_M_Y-h:i&nbsp;A'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;w1</span><span style="color: #007700">=</span><span style="color: #DD0000">"PM"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;w2</span><span style="color: #007700">=</span><span style="color: #DD0000">"مساء"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;yearss&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;w1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;w2</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;yearss</span><span style="color: #007700">);&nbsp;<br /></span></code></div></div></div>وهذا الكود ماعرفت اعدل عليه<br />
<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code>&#36;string = "AM,PM";<br />
&#36;str = array((("AM" =&gt; "صباحا"),"PM" =&gt; "مساء"));<br />
&#36;yearss = strtr(&#36;string, &#36;str);</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[لوحة تحكم السي بنل غير منسقه]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56219</link>
			<pubDate>Wed, 08 Apr 2026 03:33:58 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=49603">nnnjk</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56219</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
لوحة تحكم cpanel الاستضافه غير منسقه <br />
كلمت مسؤلي الاستضافه قالوا استخدم كمبيوتر <br />
وانا ماعندي جهاز كمبيوتر استخدمت chrome واكثر من متصفح للاندرويد ونفس المشكله انظروا الصوره ولا استطيع ادارة حسابي في الاستضافه لان القوائم لاتظهر</div><br />
<br />
<img src="https://vb4arb.com/vb/images/attachtypes/image.gif" title="PNG Image" border="0" alt=".png" />
&nbsp;&nbsp;<a class="attachembed" href="attachment.php?aid=30175" target="_blank" title="">٢٠٢٦-٠٤-٠٨ ٠٦.٢٦.٣٣.png</a> (الحجم : 116.8 ك ب / التحميلات : 18)
]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
لوحة تحكم cpanel الاستضافه غير منسقه <br />
كلمت مسؤلي الاستضافه قالوا استخدم كمبيوتر <br />
وانا ماعندي جهاز كمبيوتر استخدمت chrome واكثر من متصفح للاندرويد ونفس المشكله انظروا الصوره ولا استطيع ادارة حسابي في الاستضافه لان القوائم لاتظهر</div><br />
<br />
<img src="https://vb4arb.com/vb/images/attachtypes/image.gif" title="PNG Image" border="0" alt=".png" />
&nbsp;&nbsp;<a class="attachembed" href="attachment.php?aid=30175" target="_blank" title="">٢٠٢٦-٠٤-٠٨ ٠٦.٢٦.٣٣.png</a> (الحجم : 116.8 ك ب / التحميلات : 18)
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[كيف اطبع حجم الملف بعد الرفع]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56218</link>
			<pubDate>Tue, 07 Apr 2026 15:43:05 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=49603">nnnjk</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56218</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">جدت حل لمشكلتي وهو يخص نسخة php5.6 التي اعمل عليها</div>
وهذا الرابط<br />
<a href="https://stackoverflow.com/questions/41575673/getimagesize-not-working-on-php-5-6" target="_blank" rel="noopener" class="mycode_url">https://stackoverflow.com/questions/4157...on-php-5-6</a><br />
لاكن لم يفتح عندي وتتكرر هذه الصفحة حتى بعد التاشير على علامة ✔<br />
<br />
<img src="https://vb4arb.com/vb/images/attachtypes/image.gif" title="PNG Image" border="0" alt=".png" />
&nbsp;&nbsp;<a class="attachembed" href="attachment.php?aid=30174" target="_blank" title="">Screenshot_٢٠٢٦-٠٤-٠٧-١٩-٣٧-٤٤.png</a> (الحجم : 155.03 ك ب / التحميلات : 58)
]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">جدت حل لمشكلتي وهو يخص نسخة php5.6 التي اعمل عليها</div>
وهذا الرابط<br />
<a href="https://stackoverflow.com/questions/41575673/getimagesize-not-working-on-php-5-6" target="_blank" rel="noopener" class="mycode_url">https://stackoverflow.com/questions/4157...on-php-5-6</a><br />
لاكن لم يفتح عندي وتتكرر هذه الصفحة حتى بعد التاشير على علامة ✔<br />
<br />
<img src="https://vb4arb.com/vb/images/attachtypes/image.gif" title="PNG Image" border="0" alt=".png" />
&nbsp;&nbsp;<a class="attachembed" href="attachment.php?aid=30174" target="_blank" title="">Screenshot_٢٠٢٦-٠٤-٠٧-١٩-٣٧-٤٤.png</a> (الحجم : 155.03 ك ب / التحميلات : 58)
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[اريد كودين php الاول وصف لملف والاخر اظهار الوصف]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56217</link>
			<pubDate>Mon, 06 Apr 2026 15:27:18 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=49603">nnnjk</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56217</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله وبركاته<br />
اطلب من الاخوه الاعظاء في هذا المنتدى المبارك ومن الاخ Amir_Alzubidy<br />
كودين php الاول اضافة وصف للملف بالعربي عند رفعه مثلا<br />
والكود الاخر اظهار وصف الملف وكلا الكودين اريدهما بدون استخدام قاعدة بينات فمثلا هذا الكود المتواضع يبحث عن اسم الملف وملحقه لاكن عيوبه انه لا يبحث بالعربي ولا يبحث عن كلمة في الملف</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;goo</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_GET</span><span style="color: #007700">[</span><span style="color: #DD0000">'soo'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp;<br />&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"/home/username/domains/domain.site/public_html/uploads/</span><span style="color: #0000BB">&#36;goo</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /><br />if&nbsp;(</span><span style="color: #0000BB">file_exists</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">))&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"The&nbsp;file&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #DD0000">&nbsp;exists"</span><span style="color: #007700">;<br />}&nbsp;else&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"The&nbsp;file&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #DD0000">&nbsp;does&nbsp;not&nbsp;exist"</span><span style="color: #007700">;<br />}&nbsp;<br /></span></code></div></div></div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله وبركاته<br />
اطلب من الاخوه الاعظاء في هذا المنتدى المبارك ومن الاخ Amir_Alzubidy<br />
كودين php الاول اضافة وصف للملف بالعربي عند رفعه مثلا<br />
والكود الاخر اظهار وصف الملف وكلا الكودين اريدهما بدون استخدام قاعدة بينات فمثلا هذا الكود المتواضع يبحث عن اسم الملف وملحقه لاكن عيوبه انه لا يبحث بالعربي ولا يبحث عن كلمة في الملف</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;goo</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_GET</span><span style="color: #007700">[</span><span style="color: #DD0000">'soo'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp;<br />&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"/home/username/domains/domain.site/public_html/uploads/</span><span style="color: #0000BB">&#36;goo</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /><br />if&nbsp;(</span><span style="color: #0000BB">file_exists</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">))&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"The&nbsp;file&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #DD0000">&nbsp;exists"</span><span style="color: #007700">;<br />}&nbsp;else&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"The&nbsp;file&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #DD0000">&nbsp;does&nbsp;not&nbsp;exist"</span><span style="color: #007700">;<br />}&nbsp;<br /></span></code></div></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[اريد دمج هذين الكودين بكود واحد]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56214</link>
			<pubDate>Sun, 05 Apr 2026 14:44:50 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=49603">nnnjk</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56214</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
اريد من الاخوه الاكارم</div>
<div style="text-align: center;" class="mycode_align">دمج هذين الكودين في كود واحد حيث لايسمح باستخدام كودين منفصلين وذلك لاختلاف الطلب<br />
وهذين الكودين</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;contextt</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">stream_context_create</span><span style="color: #007700">(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"http"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"header"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"User-Agent:&nbsp;Mozilla/5.0&nbsp;(Windows&nbsp;NT&nbsp;10.0;&nbsp;WOW64)&nbsp;AppleWebKit/537.36&nbsp;(KHTML,&nbsp;like&nbsp;Gecko)&nbsp;Chrome/50.0.2661.102&nbsp;Safari/537.36"<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">))<br />);<br />--------------------------------<br /></span><span style="color: #0000BB">&#36;context&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">stream_context_create<br /></span><span style="color: #007700">([<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'ssl'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;[<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'verify_peer'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'verify_peer_name'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">],<br />]);&nbsp;<br /></span></code></div></div></div><hr class="mycode_hr" />
يعطيكم العافيه<br />
نجحت في دمجهما ونقل جميع الصور حتى من موقع ويكيبيديا والرياض والمرصد<br />
وهذا الكودين بعد الدمج<br />
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;context&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">stream_context_create<br /></span><span style="color: #007700">([<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">"http"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"header"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"User-Agent:&nbsp;Mozilla/5.0&nbsp;(Windows&nbsp;NT&nbsp;10.0;&nbsp;WOW64)&nbsp;AppleWebKit/537.36&nbsp;(KHTML,&nbsp;like&nbsp;Gecko)&nbsp;Chrome/50.0.2661.102&nbsp;Safari/537.36"<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">),<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'ssl'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;[<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'verify_peer'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'verify_peer_name'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">],<br />]<br />);&nbsp;<br /></span></code></div></div></div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
اريد من الاخوه الاكارم</div>
<div style="text-align: center;" class="mycode_align">دمج هذين الكودين في كود واحد حيث لايسمح باستخدام كودين منفصلين وذلك لاختلاف الطلب<br />
وهذين الكودين</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;contextt</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">stream_context_create</span><span style="color: #007700">(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"http"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"header"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"User-Agent:&nbsp;Mozilla/5.0&nbsp;(Windows&nbsp;NT&nbsp;10.0;&nbsp;WOW64)&nbsp;AppleWebKit/537.36&nbsp;(KHTML,&nbsp;like&nbsp;Gecko)&nbsp;Chrome/50.0.2661.102&nbsp;Safari/537.36"<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">))<br />);<br />--------------------------------<br /></span><span style="color: #0000BB">&#36;context&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">stream_context_create<br /></span><span style="color: #007700">([<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'ssl'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;[<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'verify_peer'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'verify_peer_name'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">],<br />]);&nbsp;<br /></span></code></div></div></div><hr class="mycode_hr" />
يعطيكم العافيه<br />
نجحت في دمجهما ونقل جميع الصور حتى من موقع ويكيبيديا والرياض والمرصد<br />
وهذا الكودين بعد الدمج<br />
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;context&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">stream_context_create<br /></span><span style="color: #007700">([<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">"http"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;array(<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">"header"&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #DD0000">"User-Agent:&nbsp;Mozilla/5.0&nbsp;(Windows&nbsp;NT&nbsp;10.0;&nbsp;WOW64)&nbsp;AppleWebKit/537.36&nbsp;(KHTML,&nbsp;like&nbsp;Gecko)&nbsp;Chrome/50.0.2661.102&nbsp;Safari/537.36"<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">),<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #DD0000">'ssl'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;[<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'verify_peer'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #DD0000">'verify_peer_name'&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">,<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">],<br />]<br />);&nbsp;<br /></span></code></div></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[تغيير الكود ليتوافق مع تفعيل خاصية safe mode]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56213</link>
			<pubDate>Sat, 04 Apr 2026 15:03:16 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=49603">nnnjk</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56213</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله وبركاته<br />
هذا الكود كان يعمل بدون مشاكل يختم الصور من الرابط او المرفقات<br />
ولاكن عندما انتقلت الى استضافة تعمل على السيف مود وتجعل الرفع عن طريق مجلد مؤقت tmp فليت احد الاخوه <br />
 يعدل الكود ليتوافق مع خاصية الحماية الفائقه للسيرفر<br />
هذا الكود</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;#######################&nbsp;SET&nbsp;PHP&nbsp;ENVIRONMENT&nbsp;###########################<br /></span><span style="color: #0000BB">error_reporting</span><span style="color: #007700">(</span><span style="color: #0000BB">E_ALL&nbsp;</span><span style="color: #007700">&amp;&nbsp;~</span><span style="color: #0000BB">E_NOTICE</span><span style="color: #007700">);<br />@</span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">'Content-type:&nbsp;text/html;charset=windows-1256'</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//ini_set('default_charset','windows-1256');<br />//&nbsp;####################&nbsp;DEFINE&nbsp;IMPORTANT&nbsp;CONSTANTS&nbsp;#######################<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'NO_REGISTER_GLOBALS'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'THIS_SCRIPT'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'watermark'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;MDIR&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">dirname</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">"MDIR"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;MDIR</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;###################&nbsp;PRE-CACHE&nbsp;TEMPLATES&nbsp;AND&nbsp;DATA&nbsp;######################<br />//&nbsp;get&nbsp;special&nbsp;phrase&nbsp;groups<br /></span><span style="color: #0000BB">&#36;phrasegroups&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /><br /></span><span style="color: #FF8000">//&nbsp;get&nbsp;special&nbsp;data&nbsp;templates&nbsp;from&nbsp;the&nbsp;datastore<br /></span><span style="color: #0000BB">&#36;specialtemplates&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /><br /></span><span style="color: #FF8000">//&nbsp;pre-cache&nbsp;templates&nbsp;used&nbsp;by&nbsp;all&nbsp;actions<br /></span><span style="color: #0000BB">&#36;globaltemplates&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /><br /></span><span style="color: #FF8000">//&nbsp;pre-cache&nbsp;templates&nbsp;used&nbsp;by&nbsp;specific&nbsp;actions<br /></span><span style="color: #0000BB">&#36;actiontemplates&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /><br /><br /></span><span style="color: #FF8000">//&nbsp;#########################&nbsp;REQUIRE&nbsp;BACK-END&nbsp;############################<br /></span><span style="color: #007700">require_once(</span><span style="color: #DD0000">'./global.php'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;#######################################################################<br />//&nbsp;########################&nbsp;START&nbsp;MAIN&nbsp;SCRIPT&nbsp;############################<br />//&nbsp;#######################################################################<br /><br /></span><span style="color: #0000BB">&#36;image&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_GET</span><span style="color: #007700">[</span><span style="color: #DD0000">'src'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;minwidth&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">watermarkwidthdef</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;fontsize&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">watermarkfontsize</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;bandheight&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">watermarkbandheight</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;fontname&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">watermarkfontname</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;wmrkimage&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">watermarkimage</span><span style="color: #007700">];<br /><br /></span><span style="color: #0000BB">&#36;imagetype&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">getimagesize</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;image</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;imagetype</span><span style="color: #007700">[</span><span style="color: #DD0000">'mime'</span><span style="color: #007700">])&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/gif"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;im&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">imagecreatefromgif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;image</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/jpeg"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;im&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefromjpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;image</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/png"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;im&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;image</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/bmp"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;im&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefrombmp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;image</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br />case&nbsp;</span><span style="color: #DD0000">"image/webp"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;im&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefromwebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;image</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />if(!empty(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">)){<br /></span><span style="color: #0000BB">&#36;wmrkimagetype&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">getimagesize</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;wmrkimagetype</span><span style="color: #007700">[</span><span style="color: #DD0000">'mime'</span><span style="color: #007700">])&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/gif"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;stamp&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">imagecreatefromgif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/jpeg"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;stamp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefromjpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/png"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;stamp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/bmp"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;stamp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefrombmp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/webp"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;stamp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefromwebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br /></span><span style="color: #0000BB">&#36;imagewidth&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagesx</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">);<br /><br />if(empty(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">watermarktext</span><span style="color: #007700">])){<br /></span><span style="color: #0000BB">&#36;watermarktext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">bbtitle</span><span style="color: #007700">];<br />}<br />&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;watermarktext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">watermarktext</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />if(</span><span style="color: #0000BB">&#36;imagewidth&nbsp;</span><span style="color: #007700">&lt;=&nbsp;</span><span style="color: #0000BB">&#36;minwidth</span><span style="color: #007700">){<br /></span><span style="color: #0000BB"> &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;imagetype</span><span style="color: #007700">[</span><span style="color: #DD0000">'mime'</span><span style="color: #007700">])&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/gif"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;header&nbsp;</span><span style="color: #007700">(</span><span style="color: #DD0000">"Content-type:&nbsp;image/gif"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">readfile</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;image</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">default:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;header&nbsp;</span><span style="color: #007700">(</span><span style="color: #DD0000">"Content-type:&nbsp;image/png"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;imagegif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">);&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">imagedestroy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br />else&nbsp;{<br /><br />if(empty(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">)){<br /></span><span style="color: #FF8000">//require_once('./I18N/Arabic.php');<br />//&#36;Arabic&nbsp;=&nbsp;new&nbsp;I18N_Arabic('Glyphs');<br />&nbsp;//&#36;text&nbsp;=&nbsp;'بسم&nbsp;الله&nbsp;الرحمن&nbsp;الرحيم';<br /></span><span style="color: #0000BB">&#36;watermarktext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"الشعافينمنحرب"</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&#36;watermarktext&nbsp;=&nbsp;&#36;Arabic-&gt;utf8Glyphs('&#36;watermarktext');<br /></span><span style="color: #0000BB">&#36;stamp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatetruecolor</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;imagewidth</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;bandheight</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;ypoint&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;fontsize</span><span style="color: #007700">+</span><span style="color: #0000BB">round</span><span style="color: #007700">((</span><span style="color: #0000BB">&#36;bandheight&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">&#36;fontsize</span><span style="color: #007700">)/</span><span style="color: #0000BB">2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;ffontname&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">MDIR</span><span style="color: #007700">.</span><span style="color: #DD0000">"/includes/fonts/"</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;fontname</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">ImageTTFText</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;stamp</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;fontsize</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">15</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ypoint</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0xFFFFFF</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ffontname</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;watermarktext</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">&#36;marge_right&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;marge_bottom&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;sx&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagesx</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;stamp</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;sy&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagesy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;stamp</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">imagecopymerge</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;stamp</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">imagesx</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">)&nbsp;-&nbsp;</span><span style="color: #0000BB">&#36;sx&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">&#36;marge_right</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">imagesy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">)&nbsp;-&nbsp;</span><span style="color: #0000BB">&#36;sy&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">&#36;marge_bottom</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">imagesx</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;stamp</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">imagesy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;stamp</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">50</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">header&nbsp;</span><span style="color: #007700">(</span><span style="color: #DD0000">"Content-type:&nbsp;image/png"</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #0000BB">imagepng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">imagedestroy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">);<br />&nbsp;}<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله وبركاته<br />
هذا الكود كان يعمل بدون مشاكل يختم الصور من الرابط او المرفقات<br />
ولاكن عندما انتقلت الى استضافة تعمل على السيف مود وتجعل الرفع عن طريق مجلد مؤقت tmp فليت احد الاخوه <br />
 يعدل الكود ليتوافق مع خاصية الحماية الفائقه للسيرفر<br />
هذا الكود</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;#######################&nbsp;SET&nbsp;PHP&nbsp;ENVIRONMENT&nbsp;###########################<br /></span><span style="color: #0000BB">error_reporting</span><span style="color: #007700">(</span><span style="color: #0000BB">E_ALL&nbsp;</span><span style="color: #007700">&amp;&nbsp;~</span><span style="color: #0000BB">E_NOTICE</span><span style="color: #007700">);<br />@</span><span style="color: #0000BB">header</span><span style="color: #007700">(</span><span style="color: #DD0000">'Content-type:&nbsp;text/html;charset=windows-1256'</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">//ini_set('default_charset','windows-1256');<br />//&nbsp;####################&nbsp;DEFINE&nbsp;IMPORTANT&nbsp;CONSTANTS&nbsp;#######################<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'NO_REGISTER_GLOBALS'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'THIS_SCRIPT'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'watermark'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;MDIR&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">dirname</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">"MDIR"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;MDIR</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;###################&nbsp;PRE-CACHE&nbsp;TEMPLATES&nbsp;AND&nbsp;DATA&nbsp;######################<br />//&nbsp;get&nbsp;special&nbsp;phrase&nbsp;groups<br /></span><span style="color: #0000BB">&#36;phrasegroups&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /><br /></span><span style="color: #FF8000">//&nbsp;get&nbsp;special&nbsp;data&nbsp;templates&nbsp;from&nbsp;the&nbsp;datastore<br /></span><span style="color: #0000BB">&#36;specialtemplates&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /><br /></span><span style="color: #FF8000">//&nbsp;pre-cache&nbsp;templates&nbsp;used&nbsp;by&nbsp;all&nbsp;actions<br /></span><span style="color: #0000BB">&#36;globaltemplates&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /><br /></span><span style="color: #FF8000">//&nbsp;pre-cache&nbsp;templates&nbsp;used&nbsp;by&nbsp;specific&nbsp;actions<br /></span><span style="color: #0000BB">&#36;actiontemplates&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /><br /><br /></span><span style="color: #FF8000">//&nbsp;#########################&nbsp;REQUIRE&nbsp;BACK-END&nbsp;############################<br /></span><span style="color: #007700">require_once(</span><span style="color: #DD0000">'./global.php'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;#######################################################################<br />//&nbsp;########################&nbsp;START&nbsp;MAIN&nbsp;SCRIPT&nbsp;############################<br />//&nbsp;#######################################################################<br /><br /></span><span style="color: #0000BB">&#36;image&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;_GET</span><span style="color: #007700">[</span><span style="color: #DD0000">'src'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;minwidth&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">watermarkwidthdef</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;fontsize&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">watermarkfontsize</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;bandheight&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">watermarkbandheight</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;fontname&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">watermarkfontname</span><span style="color: #007700">];<br /></span><span style="color: #0000BB">&#36;wmrkimage&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">watermarkimage</span><span style="color: #007700">];<br /><br /></span><span style="color: #0000BB">&#36;imagetype&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">getimagesize</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;image</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;imagetype</span><span style="color: #007700">[</span><span style="color: #DD0000">'mime'</span><span style="color: #007700">])&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/gif"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;im&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">imagecreatefromgif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;image</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/jpeg"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;im&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefromjpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;image</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/png"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;im&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;image</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/bmp"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;im&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefrombmp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;image</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br />case&nbsp;</span><span style="color: #DD0000">"image/webp"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;im&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefromwebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;image</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />if(!empty(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">)){<br /></span><span style="color: #0000BB">&#36;wmrkimagetype&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">getimagesize</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;wmrkimagetype</span><span style="color: #007700">[</span><span style="color: #DD0000">'mime'</span><span style="color: #007700">])&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/gif"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;stamp&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">imagecreatefromgif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/jpeg"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;stamp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefromjpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/png"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;stamp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/bmp"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;stamp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefrombmp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/webp"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;stamp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefromwebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br /><br /></span><span style="color: #0000BB">&#36;imagewidth&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagesx</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">);<br /><br />if(empty(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">watermarktext</span><span style="color: #007700">])){<br /></span><span style="color: #0000BB">&#36;watermarktext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">bbtitle</span><span style="color: #007700">];<br />}<br />&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;watermarktext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">watermarktext</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />if(</span><span style="color: #0000BB">&#36;imagewidth&nbsp;</span><span style="color: #007700">&lt;=&nbsp;</span><span style="color: #0000BB">&#36;minwidth</span><span style="color: #007700">){<br /></span><span style="color: #0000BB"> &nbsp;</span><span style="color: #007700">switch&nbsp;(</span><span style="color: #0000BB">&#36;imagetype</span><span style="color: #007700">[</span><span style="color: #DD0000">'mime'</span><span style="color: #007700">])&nbsp;{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">case&nbsp;</span><span style="color: #DD0000">"image/gif"</span><span style="color: #007700">:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;header&nbsp;</span><span style="color: #007700">(</span><span style="color: #DD0000">"Content-type:&nbsp;image/gif"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">readfile</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;image</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">default:<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;header&nbsp;</span><span style="color: #007700">(</span><span style="color: #DD0000">"Content-type:&nbsp;image/png"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;imagegif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">);&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">imagedestroy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br />else&nbsp;{<br /><br />if(empty(</span><span style="color: #0000BB">&#36;wmrkimage</span><span style="color: #007700">)){<br /></span><span style="color: #FF8000">//require_once('./I18N/Arabic.php');<br />//&#36;Arabic&nbsp;=&nbsp;new&nbsp;I18N_Arabic('Glyphs');<br />&nbsp;//&#36;text&nbsp;=&nbsp;'بسم&nbsp;الله&nbsp;الرحمن&nbsp;الرحيم';<br /></span><span style="color: #0000BB">&#36;watermarktext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"الشعافينمنحرب"</span><span style="color: #007700">;<br /></span><span style="color: #FF8000">//&#36;watermarktext&nbsp;=&nbsp;&#36;Arabic-&gt;utf8Glyphs('&#36;watermarktext');<br /></span><span style="color: #0000BB">&#36;stamp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatetruecolor</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;imagewidth</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;bandheight</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;ypoint&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;fontsize</span><span style="color: #007700">+</span><span style="color: #0000BB">round</span><span style="color: #007700">((</span><span style="color: #0000BB">&#36;bandheight&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">&#36;fontsize</span><span style="color: #007700">)/</span><span style="color: #0000BB">2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;ffontname&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">MDIR</span><span style="color: #007700">.</span><span style="color: #DD0000">"/includes/fonts/"</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;fontname</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">ImageTTFText</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;stamp</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;fontsize</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">15</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ypoint</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0xFFFFFF</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ffontname</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;watermarktext</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">&#36;marge_right&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;marge_bottom&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;sx&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagesx</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;stamp</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;sy&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagesy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;stamp</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">imagecopymerge</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;stamp</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">imagesx</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">)&nbsp;-&nbsp;</span><span style="color: #0000BB">&#36;sx&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">&#36;marge_right</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">imagesy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">)&nbsp;-&nbsp;</span><span style="color: #0000BB">&#36;sy&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">&#36;marge_bottom</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">imagesx</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;stamp</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">imagesy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;stamp</span><span style="color: #007700">),&nbsp;</span><span style="color: #0000BB">50</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">header&nbsp;</span><span style="color: #007700">(</span><span style="color: #DD0000">"Content-type:&nbsp;image/png"</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #0000BB">imagepng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">imagedestroy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">);<br />&nbsp;}<br /></span><span style="color: #0000BB">?&gt;</span></code></div></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[كيف افعل دالة shell_exec]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56212</link>
			<pubDate>Fri, 03 Apr 2026 19:07:37 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=49603">nnnjk</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56212</guid>
			<description><![CDATA[السلام عليكم ركبت سكربت سحب الملف من رابط ولم يعمل وتأتي رسالة تم تعطيل shell_exec Warning: shell_exec() has been disabled for security reasons in كيف افعلها من الملف او من خلال ملف htaccess]]></description>
			<content:encoded><![CDATA[السلام عليكم ركبت سكربت سحب الملف من رابط ولم يعمل وتأتي رسالة تم تعطيل shell_exec Warning: shell_exec() has been disabled for security reasons in كيف افعلها من الملف او من خلال ملف htaccess]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[طلب اضافة ختم الصور لهذا الكود]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56206</link>
			<pubDate>Tue, 31 Mar 2026 15:24:28 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=49603">nnnjk</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56206</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
حاولت مرات عديده ان اختم صور كاش الصور بصورة logi.png<br />
فلم افلح فليت احد الاخوان يساعدني<br />
هذا الكود </div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br />&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">watermark</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;logo</span><span style="color: #007700">){<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/jpg|jpeg/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromjpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/webp/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromwebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/png/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/gif/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromgif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;src_logo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;logo</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bwidth &nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSX</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bheight&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSY</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;lwidth &nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSX</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;lheight&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSY</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//fix&nbsp;bug&nbsp;for&nbsp;1beta3<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(&nbsp;</span><span style="color: #0000BB">&#36;bwidth&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">160&nbsp;</span><span style="color: #007700">&amp;&amp;</span><span style="color: #0000BB"> &nbsp;&#36;bheight&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">130&nbsp;</span><span style="color: #007700">)&nbsp;{<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;src_x&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;bwidth&nbsp;</span><span style="color: #007700">-&nbsp;(</span><span style="color: #0000BB">&#36;lwidth&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;src_y&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;bheight&nbsp;</span><span style="color: #007700">-&nbsp;(</span><span style="color: #0000BB">&#36;lheight&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;ImageAlphaBlending</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;ImageCopy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_x</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_y</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;lwidth</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;lheight</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/jpg|jpeg/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagejpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/png/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagepng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br />if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/webp/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagewebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/gif/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagegif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;}</span><span style="color: #FF8000">#&nbsp;&lt;&nbsp;150<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">else<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />}<br /><br /></span><span style="color: #FF8000">/*============================================================================*&#092;<br />||&nbsp;##########################################################################&nbsp;||<br />||&nbsp;#&nbsp;Import&nbsp;External&nbsp;Images &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp;#&nbsp;||<br />||&nbsp;#&nbsp;----------------------------------------------------------------------&nbsp;#&nbsp;||<br />||&nbsp;#&nbsp;(C)&nbsp;Copyright&nbsp;Y2K&nbsp;Software&nbsp;s.a.s.&nbsp;2010&nbsp;-&nbsp;All&nbsp;Rights&nbsp;Reserved. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp;||<br />||&nbsp;#&nbsp;This&nbsp;file&nbsp;may&nbsp;not&nbsp;be&nbsp;redistributed&nbsp;in&nbsp;whole&nbsp;or&nbsp;significant&nbsp;part. &nbsp; &nbsp;  &nbsp;#&nbsp;||<br />||&nbsp;##########################################################################&nbsp;||<br />&#092;*============================================================================*/<br /><br />/**<br />&nbsp;*&nbsp;@author&nbsp;Y2K&nbsp;Software<br />&nbsp;*&nbsp;@copyright&nbsp;(C)&nbsp;Copyright&nbsp;Y2K&nbsp;Software&nbsp;2010&nbsp;-&nbsp;All&nbsp;Rights&nbsp;Reserved<br />&nbsp;*&nbsp;@version&nbsp;1.0.2<br />&nbsp;*&nbsp;@link&nbsp;www.pagerobot.com<br />&nbsp;*/<br /><br /></span><span style="color: #0000BB">error_reporting</span><span style="color: #007700">(</span><span style="color: #0000BB">E_ALL&nbsp;</span><span style="color: #007700">&amp;&nbsp;~&nbsp;</span><span style="color: #0000BB">E_NOTICE</span><span style="color: #007700">);<br />if(!</span><span style="color: #0000BB">is_object</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">))<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">exit;<br />}<br /><br />if&nbsp;(!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'mwaextraadmin5_setting_active_imgcache'</span><span style="color: #007700">])<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">exit;<br />}<br /><br /></span><span style="color: #FF8000">/**<br />&nbsp;*&nbsp;iei_cache_registered_images()<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;Reads&nbsp;all&nbsp;registered&nbsp;images&nbsp;into&nbsp;memory&nbsp;for&nbsp;fast&nbsp;parsing.<br />&nbsp;*&nbsp;If&nbsp;you&nbsp;have&nbsp;a&nbsp;large&nbsp;board,&nbsp;you&nbsp;may&nbsp;need&nbsp;to&nbsp;clean&nbsp;out&nbsp;this&nbsp;table&nbsp;from&nbsp;time&nbsp;to&nbsp;time&nbsp;by&nbsp;removing&nbsp;old&nbsp;records.<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;@return&nbsp;array&nbsp;&#36;images<br />&nbsp;*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">iei_cache_registered_images</span><span style="color: #007700">()<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">global&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;images&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"SELECT&nbsp;oldurl,&nbsp;newurl&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"iei_img"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;rss&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_read</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;SQL</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">while(</span><span style="color: #0000BB">&#36;rs&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;rss</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;images</span><span style="color: #007700">[</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #0000BB">oldurl</span><span style="color: #007700">]</span><span style="color: #DD0000">"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #DD0000">'newurl'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">free_result</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;rss</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">&#36;images</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">/**<br />&nbsp;*&nbsp;iei_normalize_path()<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;Avoid&nbsp;strange&nbsp;path&nbsp;names.<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;&#36;path<br />&nbsp;*&nbsp;@return&nbsp;mixed&nbsp;&#36;path<br />&nbsp;*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">iei_normalize_path</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">,&nbsp;-</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;!=&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;path&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;path&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">'&#092;&#092;'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">strpos</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">':'</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;path&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">'//'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">/**<br />&nbsp;*&nbsp;iei_get_file_index()<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;Search&nbsp;a&nbsp;new&nbsp;file&nbsp;name.<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;&#36;path<br />&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;&#36;extension<br />&nbsp;*&nbsp;@return&nbsp;mixed&nbsp;&#36;filename<br />&nbsp;*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">iei_get_file_index</span><span style="color: #007700">(&amp;</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">,&nbsp;&amp;</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">for(</span><span style="color: #0000BB">&#36;i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;;&nbsp;</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">++)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;path</span><span style="color: #DD0000">/</span><span style="color: #0000BB">&#36;i</span><span style="color: #DD0000">.</span><span style="color: #0000BB">&#36;extension</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">file_exists</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br />}<br /><br /></span><span style="color: #FF8000">/**<br />&nbsp;*&nbsp;iei_get_file_extension()<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;Sanitize&nbsp;extension.<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;&#36;value<br />&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;&#36;convert<br />&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;&#36;extension<br />&nbsp;*&nbsp;@return&nbsp;void<br />&nbsp;*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">iei_get_file_extension</span><span style="color: #007700">(&amp;</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">,&nbsp;&amp;</span><span style="color: #0000BB">&#36;convert</span><span style="color: #007700">,&nbsp;&amp;</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">ALWAYS_CONVERT_IMAGES</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;convert&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;extension&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">return;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;convert&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">strrpos</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'.'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;i&nbsp;</span><span style="color: #007700">===&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;convert&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;extension&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">return;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;extension&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;i&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">strpos</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">)&nbsp;!==&nbsp;</span><span style="color: #0000BB">false&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">strpos</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'&amp;'</span><span style="color: #007700">)&nbsp;!==&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;convert&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;extension&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;extension&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">strtolower</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">);<br />}<br /><br /></span><span style="color: #FF8000">/**<br />&nbsp;*&nbsp;iei_get_contents()<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;Get&nbsp;file&nbsp;from&nbsp;remote&nbsp;site.<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;&#36;url<br />&nbsp;*&nbsp;@return&nbsp;&#36;contents&nbsp;/&nbsp;false&nbsp;on&nbsp;error<br />&nbsp;*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">iei_get_contents</span><span style="color: #007700">(&amp;</span><span style="color: #0000BB">&#36;url</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;ch&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">USE_CURL</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;ch&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">curl_init</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;url</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_BINARYTRANSFER</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_RETURNTRANSFER</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_FAILONERROR</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_FOLLOWLOCATION</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_CONNECTTIMEOUT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">10</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_TIMEOUT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">120</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_REFERER</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">AEI_BBURL&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_USERAGENT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">AEI_FORUMDOMAIN</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;contents&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">curl_exec</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">curl_close</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;If&nbsp;CURL&nbsp;didn't&nbsp;work,&nbsp;try&nbsp;it&nbsp;differently<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;contents&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">file_get_contents</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;imagename</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">&#36;contents&nbsp;</span><span style="color: #007700">?&nbsp;</span><span style="color: #0000BB">&#36;contents&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">//&nbsp;Get&nbsp;iei&nbsp;options<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'USE_CURL'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">function_exists</span><span style="color: #007700">(</span><span style="color: #DD0000">'curl_init'</span><span style="color: #007700">));<br />foreach(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">&#36;key&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">strpos</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;key</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'iei_'</span><span style="color: #007700">)&nbsp;===&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">&#36;</span><span style="color: #0000BB">&#36;key&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'ALWAYS_CONVERT_IMAGES'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;iei_always_convert_images</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Adjust&nbsp;options<br /></span><span style="color: #0000BB">&#36;bburl0&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bburl'</span><span style="color: #007700">];<br />if(</span><span style="color: #0000BB">&#36;iei_bburl_replacement</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bburl&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;iei_bburl_replacement&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">;<br />}<br />else<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bburl&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;bburl0&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">&#36;iei_imported_images_folder&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">iei_normalize_path</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;iei_imported_images_folder</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;iei_ignore&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">explode</span><span style="color: #007700">(</span><span style="color: #DD0000">"&#092;r&#092;n"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;iei_ignore</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;iei_ignore</span><span style="color: #007700">[]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;bburl</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;iei_ignore</span><span style="color: #007700">[]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;bburl0&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;iei_ignore</span><span style="color: #007700">[]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;iei_imported_images_folder</span><span style="color: #007700">;<br />if(</span><span style="color: #0000BB">&#36;iei_remove_invalid_images</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;iei_ignore</span><span style="color: #007700">[]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;iei_invalid_image_replacement</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">//&nbsp;Exclude&nbsp;all&nbsp;new&nbsp;records&nbsp;which&nbsp;have&nbsp;no&nbsp;images&nbsp;at&nbsp;all<br /></span><span style="color: #0000BB">&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"UPDATE&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"post&nbsp;<br /> &nbsp; &nbsp;SET&nbsp;iei_parsed=1<br /> &nbsp; &nbsp;WHERE&nbsp;iei_parsed=0<br /> &nbsp; &nbsp; &nbsp; &nbsp;AND&nbsp;NOT&nbsp;pagetext&nbsp;LIKE&nbsp;'%[/IMG]%'"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;SQL</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">&#36;mwaimgcache_mwanotforumid&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"AND&nbsp;thread.forumid&nbsp;NOT&nbsp;IN&nbsp;(0)"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;iei_ignore_usersp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"AND&nbsp;post.userid&nbsp;NOT&nbsp;IN&nbsp;(0)"</span><span style="color: #007700">;<br /><br />if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'mwaimgcache_mwanotforumid'</span><span style="color: #007700">])<br />{<br /></span><span style="color: #0000BB">&#36;mwaimgcache_mwanotforumid&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"AND&nbsp;thread.forumid&nbsp;NOT&nbsp;IN&nbsp;("&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'mwaimgcache_mwanotforumid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">")"</span><span style="color: #007700">;<br />}<br /><br />if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'iei_ignore_users'</span><span style="color: #007700">])<br />{<br /></span><span style="color: #0000BB">&#36;iei_ignore_usersp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"AND&nbsp;post.userid&nbsp;NOT&nbsp;IN&nbsp;("&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'iei_ignore_users'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">")"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">//&nbsp;For&nbsp;each&nbsp;record&nbsp;with&nbsp;images&nbsp;...<br /></span><span style="color: #0000BB">&#36;cnt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"SELECT&nbsp;post.postid,&nbsp;post.userid,&nbsp;post.dateline,&nbsp;post.pagetext&nbsp;,&nbsp;post.iei_parsed<br /> &nbsp; &nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"post&nbsp;AS&nbsp;post<br /> &nbsp; &nbsp;LEFT&nbsp;JOIN&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"thread&nbsp;AS&nbsp;thread&nbsp;ON(thread.threadid&nbsp;=&nbsp;post.threadid)<br /> &nbsp; &nbsp;WHERE&nbsp;post.iei_parsed=0<br /> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #0000BB">&#36;mwaimgcache_mwanotforumid</span><span style="color: #DD0000"><br /> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #0000BB">&#36;iei_ignore_usersp</span><span style="color: #DD0000"><br /> &nbsp; &nbsp; &nbsp; &nbsp;AND&nbsp;post.pagetext&nbsp;LIKE&nbsp;'%[/IMG]%'<br /> &nbsp; &nbsp;ORDER&nbsp;BY&nbsp;post.dateline&nbsp;DESC"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">&#36;rss&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_read</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;SQL</span><span style="color: #007700">);<br />while(</span><span style="color: #0000BB">&#36;rs&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;rss</span><span style="color: #007700">))<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;cnt</span><span style="color: #007700">++;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;cnt&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">&#36;iei_max_post_count</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;cnt&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Cache&nbsp;registered&nbsp;images<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;images&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">iei_cache_registered_images</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;pagetext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #DD0000">'pagetext'</span><span style="color: #007700">];<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Find&nbsp;all&nbsp;embedded&nbsp;images<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">preg_match_all</span><span style="color: #007700">(</span><span style="color: #DD0000">'/&#092;[img.*?&#092;](.*?)&#092;[&#092;/img&#092;]/is'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;pagetext</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;matches</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"UPDATE&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"post&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SET&nbsp;iei_parsed=1<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHERE&nbsp;postid=</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #0000BB">postid</span><span style="color: #007700">]</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;SQL</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;changed&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;matches</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;as&nbsp;</span><span style="color: #0000BB">&#36;key&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;error&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Search&nbsp;for&nbsp;images&nbsp;to&nbsp;be&nbsp;ignored<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;ignore&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;iei_ignore&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">&#36;ivalue</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;value&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;</span><span style="color: #0000BB">&#36;ivalue&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;</span><span style="color: #0000BB">strpos</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ivalue</span><span style="color: #007700">)&nbsp;!==&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ignore&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;ignore</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;If&nbsp;we&nbsp;haven't&nbsp;got&nbsp;the&nbsp;image&nbsp;yet,&nbsp;download<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;images</span><span style="color: #007700">[</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;value</span><span style="color: #DD0000">"</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;newimage&nbsp;</span><span style="color: #007700">=&nbsp;!</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">while(</span><span style="color: #0000BB">&#36;newimage</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Get&nbsp;file&nbsp;from&nbsp;remote&nbsp;site<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;contents&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">iei_get_contents</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Missing&nbsp;contents<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;error&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Get&nbsp;file&nbsp;extension<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iei_get_file_extension</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;convert</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;fileplace</span><span style="color: #007700">=</span><span style="color: #DD0000">"images/imgcache"</span><span style="color: #007700">;<br />@</span><span style="color: #0000BB">watermark</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileplace</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">,</span><span style="color: #DD0000">'&#36;iei_imported_images_folder/logo.png'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Make&nbsp;path<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;path&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;iei_imported_images_folder&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y/m'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #DD0000">'dateline'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">mkdir</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0755</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Get&nbsp;file&nbsp;index<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">iei_get_file_index</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;See&nbsp;if&nbsp;we&nbsp;have&nbsp;valid&nbsp;contents<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;im&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">imagecreatefromstring</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;contents</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Missing&nbsp;image&nbsp;or&nbsp;erroneous&nbsp;file&nbsp;image<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;error&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}&nbsp;elseif(</span><span style="color: #0000BB">&#36;convert</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Convert&nbsp;image<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!@</span><span style="color: #0000BB">imagejpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Error&nbsp;during&nbsp;saving<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;error&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Save&nbsp;it<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(@</span><span style="color: #0000BB">file_put_contents</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;contents</span><span style="color: #007700">)&nbsp;===&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Error&nbsp;during&nbsp;saving<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;error&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">imagedestroy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;error</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Missing&nbsp;image&nbsp;or&nbsp;erroneous&nbsp;file&nbsp;image<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;iei_remove_invalid_images&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;</span><span style="color: #0000BB">&#36;iei_invalid_image_replacement</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;iei_invalid_image_replacement</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;error&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;If&nbsp;we&nbsp;have&nbsp;a&nbsp;new&nbsp;image,&nbsp;save&nbsp;it<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;newimage</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;images</span><span style="color: #007700">[</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;value</span><span style="color: #DD0000">"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;bburl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;oldurl&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;newurl&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;images</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"INSERT&nbsp;IGNORE&nbsp;INTO&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"iei_img&nbsp;(<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oldurl,&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;newurl<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;)&nbsp;VALUES&nbsp;(<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'</span><span style="color: #0000BB">&#36;oldurl</span><span style="color: #DD0000">',&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'</span><span style="color: #0000BB">&#36;newurl</span><span style="color: #DD0000">'<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;)"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;SQL</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;error</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Replace&nbsp;this&nbsp;image<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;changed&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;pagetext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;matches</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">][</span><span style="color: #0000BB">&#36;key</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">'[img]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;images</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'[/img]'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;pagetext</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;changed</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;pagetext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;pagetext</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"UPDATE&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"post&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SET&nbsp;pagetext='</span><span style="color: #0000BB">&#36;pagetext</span><span style="color: #DD0000">',&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iei_parsed=1<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHERE&nbsp;postid=</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #0000BB">postid</span><span style="color: #007700">]</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;fmt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'Changed&nbsp;Post:&nbsp;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"UPDATE&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"post&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SET&nbsp;iei_parsed=1<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHERE&nbsp;postid=</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #0000BB">postid</span><span style="color: #007700">]</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;fmt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'Unchanged&nbsp;Post:&nbsp;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;fmt&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #DD0000">'&lt;a&nbsp;href="%s/showthread.php?p=%d#post%d"&nbsp;target="_blank"&gt;%d&lt;/a&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;msg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">sprintf</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fmt</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;bburl0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #DD0000">'postid'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #DD0000">'postid'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #DD0000">'postid'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;SQL</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;changed</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"DELETE&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"postparsed&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHERE&nbsp;postid=</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #0000BB">postid</span><span style="color: #007700">]</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;SQL</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;log_cron_action</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;msg</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;nextitem</span><span style="color: #007700">);<br />}&nbsp;<br /></span></code></div></div></div><div style="text-align: center;" class="mycode_align">
وابحث عن كلمة watermark تجد البيانات التي ادرجتها</div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
حاولت مرات عديده ان اختم صور كاش الصور بصورة logi.png<br />
فلم افلح فليت احد الاخوان يساعدني<br />
هذا الكود </div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php<br />&nbsp;</span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">watermark</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;logo</span><span style="color: #007700">){<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/jpg|jpeg/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromjpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/webp/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromwebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/png/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/gif/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">=</span><span style="color: #0000BB">imagecreatefromgif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#36;src_logo&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imagecreatefrompng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;logo</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bwidth &nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSX</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bheight&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSY</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;lwidth &nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSX</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;lheight&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">imageSY</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//fix&nbsp;bug&nbsp;for&nbsp;1beta3<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">if&nbsp;(&nbsp;</span><span style="color: #0000BB">&#36;bwidth&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">160&nbsp;</span><span style="color: #007700">&amp;&amp;</span><span style="color: #0000BB"> &nbsp;&#36;bheight&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">130&nbsp;</span><span style="color: #007700">)&nbsp;{<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;src_x&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;bwidth&nbsp;</span><span style="color: #007700">-&nbsp;(</span><span style="color: #0000BB">&#36;lwidth&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;src_y&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;bheight&nbsp;</span><span style="color: #007700">-&nbsp;(</span><span style="color: #0000BB">&#36;lheight&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;ImageAlphaBlending</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;ImageCopy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_logo</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_x</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;src_y</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;lwidth</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;lheight</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/jpg|jpeg/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagejpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/png/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagepng</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br />if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/webp/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagewebp</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">preg_match</span><span style="color: #007700">(</span><span style="color: #DD0000">"/gif/"</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)){</span><span style="color: #0000BB">imagegif</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;src_img</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">);}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;}</span><span style="color: #FF8000">#&nbsp;&lt;&nbsp;150<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">else<br />&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />}<br /><br /></span><span style="color: #FF8000">/*============================================================================*&#092;<br />||&nbsp;##########################################################################&nbsp;||<br />||&nbsp;#&nbsp;Import&nbsp;External&nbsp;Images &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  &nbsp;#&nbsp;||<br />||&nbsp;#&nbsp;----------------------------------------------------------------------&nbsp;#&nbsp;||<br />||&nbsp;#&nbsp;(C)&nbsp;Copyright&nbsp;Y2K&nbsp;Software&nbsp;s.a.s.&nbsp;2010&nbsp;-&nbsp;All&nbsp;Rights&nbsp;Reserved. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#&nbsp;||<br />||&nbsp;#&nbsp;This&nbsp;file&nbsp;may&nbsp;not&nbsp;be&nbsp;redistributed&nbsp;in&nbsp;whole&nbsp;or&nbsp;significant&nbsp;part. &nbsp; &nbsp;  &nbsp;#&nbsp;||<br />||&nbsp;##########################################################################&nbsp;||<br />&#092;*============================================================================*/<br /><br />/**<br />&nbsp;*&nbsp;@author&nbsp;Y2K&nbsp;Software<br />&nbsp;*&nbsp;@copyright&nbsp;(C)&nbsp;Copyright&nbsp;Y2K&nbsp;Software&nbsp;2010&nbsp;-&nbsp;All&nbsp;Rights&nbsp;Reserved<br />&nbsp;*&nbsp;@version&nbsp;1.0.2<br />&nbsp;*&nbsp;@link&nbsp;www.pagerobot.com<br />&nbsp;*/<br /><br /></span><span style="color: #0000BB">error_reporting</span><span style="color: #007700">(</span><span style="color: #0000BB">E_ALL&nbsp;</span><span style="color: #007700">&amp;&nbsp;~&nbsp;</span><span style="color: #0000BB">E_NOTICE</span><span style="color: #007700">);<br />if(!</span><span style="color: #0000BB">is_object</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">))<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">exit;<br />}<br /><br />if&nbsp;(!</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'mwaextraadmin5_setting_active_imgcache'</span><span style="color: #007700">])<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">exit;<br />}<br /><br /></span><span style="color: #FF8000">/**<br />&nbsp;*&nbsp;iei_cache_registered_images()<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;Reads&nbsp;all&nbsp;registered&nbsp;images&nbsp;into&nbsp;memory&nbsp;for&nbsp;fast&nbsp;parsing.<br />&nbsp;*&nbsp;If&nbsp;you&nbsp;have&nbsp;a&nbsp;large&nbsp;board,&nbsp;you&nbsp;may&nbsp;need&nbsp;to&nbsp;clean&nbsp;out&nbsp;this&nbsp;table&nbsp;from&nbsp;time&nbsp;to&nbsp;time&nbsp;by&nbsp;removing&nbsp;old&nbsp;records.<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;@return&nbsp;array&nbsp;&#36;images<br />&nbsp;*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">iei_cache_registered_images</span><span style="color: #007700">()<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">global&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;images&nbsp;</span><span style="color: #007700">=&nbsp;array();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"SELECT&nbsp;oldurl,&nbsp;newurl&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"iei_img"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;rss&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_read</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;SQL</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">while(</span><span style="color: #0000BB">&#36;rs&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;rss</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;images</span><span style="color: #007700">[</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #0000BB">oldurl</span><span style="color: #007700">]</span><span style="color: #DD0000">"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #DD0000">'newurl'</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">free_result</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;rss</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">&#36;images</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">/**<br />&nbsp;*&nbsp;iei_normalize_path()<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;Avoid&nbsp;strange&nbsp;path&nbsp;names.<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;&#36;path<br />&nbsp;*&nbsp;@return&nbsp;mixed&nbsp;&#36;path<br />&nbsp;*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">iei_normalize_path</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">,&nbsp;-</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;!=&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;path&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;path&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">'&#092;&#092;'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">strpos</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">':'</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;path&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #DD0000">'//'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">/**<br />&nbsp;*&nbsp;iei_get_file_index()<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;Search&nbsp;a&nbsp;new&nbsp;file&nbsp;name.<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;&#36;path<br />&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;&#36;extension<br />&nbsp;*&nbsp;@return&nbsp;mixed&nbsp;&#36;filename<br />&nbsp;*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">iei_get_file_index</span><span style="color: #007700">(&amp;</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">,&nbsp;&amp;</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">for(</span><span style="color: #0000BB">&#36;i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;;&nbsp;</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">++)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;path</span><span style="color: #DD0000">/</span><span style="color: #0000BB">&#36;i</span><span style="color: #DD0000">.</span><span style="color: #0000BB">&#36;extension</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">file_exists</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br />}<br /><br /></span><span style="color: #FF8000">/**<br />&nbsp;*&nbsp;iei_get_file_extension()<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;Sanitize&nbsp;extension.<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;&#36;value<br />&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;&#36;convert<br />&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;&#36;extension<br />&nbsp;*&nbsp;@return&nbsp;void<br />&nbsp;*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">iei_get_file_extension</span><span style="color: #007700">(&amp;</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">,&nbsp;&amp;</span><span style="color: #0000BB">&#36;convert</span><span style="color: #007700">,&nbsp;&amp;</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">ALWAYS_CONVERT_IMAGES</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;convert&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;extension&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">return;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;convert&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">strrpos</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'.'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;i&nbsp;</span><span style="color: #007700">===&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;convert&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;extension&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">return;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;extension&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;i&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">strpos</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">)&nbsp;!==&nbsp;</span><span style="color: #0000BB">false&nbsp;</span><span style="color: #007700">||&nbsp;</span><span style="color: #0000BB">strpos</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'&amp;'</span><span style="color: #007700">)&nbsp;!==&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;convert&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;extension&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'jpg'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;extension&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">strtolower</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">);<br />}<br /><br /></span><span style="color: #FF8000">/**<br />&nbsp;*&nbsp;iei_get_contents()<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;Get&nbsp;file&nbsp;from&nbsp;remote&nbsp;site.<br />&nbsp;*&nbsp;<br />&nbsp;*&nbsp;@param&nbsp;mixed&nbsp;&#36;url<br />&nbsp;*&nbsp;@return&nbsp;&#36;contents&nbsp;/&nbsp;false&nbsp;on&nbsp;error<br />&nbsp;*/<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">iei_get_contents</span><span style="color: #007700">(&amp;</span><span style="color: #0000BB">&#36;url</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;ch&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">USE_CURL</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;ch&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">curl_init</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;url</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_BINARYTRANSFER</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_RETURNTRANSFER</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_FAILONERROR</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_FOLLOWLOCATION</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_CONNECTTIMEOUT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">10</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_TIMEOUT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">120</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_REFERER</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">AEI_BBURL&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">CURLOPT_USERAGENT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">AEI_FORUMDOMAIN</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;contents&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">curl_exec</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">curl_close</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;ch</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;If&nbsp;CURL&nbsp;didn't&nbsp;work,&nbsp;try&nbsp;it&nbsp;differently<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;contents&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">file_get_contents</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;imagename</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">return&nbsp;</span><span style="color: #0000BB">&#36;contents&nbsp;</span><span style="color: #007700">?&nbsp;</span><span style="color: #0000BB">&#36;contents&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">//&nbsp;Get&nbsp;iei&nbsp;options<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'USE_CURL'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">function_exists</span><span style="color: #007700">(</span><span style="color: #DD0000">'curl_init'</span><span style="color: #007700">));<br />foreach(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">&#36;key&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">strpos</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;key</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'iei_'</span><span style="color: #007700">)&nbsp;===&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">&#36;</span><span style="color: #0000BB">&#36;key&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">define</span><span style="color: #007700">(</span><span style="color: #DD0000">'ALWAYS_CONVERT_IMAGES'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;iei_always_convert_images</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Adjust&nbsp;options<br /></span><span style="color: #0000BB">&#36;bburl0&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'bburl'</span><span style="color: #007700">];<br />if(</span><span style="color: #0000BB">&#36;iei_bburl_replacement</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bburl&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;iei_bburl_replacement&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">;<br />}<br />else<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;bburl&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;bburl0&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">&#36;iei_imported_images_folder&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">iei_normalize_path</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;iei_imported_images_folder</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;iei_ignore&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">explode</span><span style="color: #007700">(</span><span style="color: #DD0000">"&#092;r&#092;n"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;iei_ignore</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;iei_ignore</span><span style="color: #007700">[]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;bburl</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;iei_ignore</span><span style="color: #007700">[]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;bburl0&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">'/'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;iei_ignore</span><span style="color: #007700">[]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;iei_imported_images_folder</span><span style="color: #007700">;<br />if(</span><span style="color: #0000BB">&#36;iei_remove_invalid_images</span><span style="color: #007700">)<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;iei_ignore</span><span style="color: #007700">[]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;iei_invalid_image_replacement</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">//&nbsp;Exclude&nbsp;all&nbsp;new&nbsp;records&nbsp;which&nbsp;have&nbsp;no&nbsp;images&nbsp;at&nbsp;all<br /></span><span style="color: #0000BB">&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"UPDATE&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"post&nbsp;<br /> &nbsp; &nbsp;SET&nbsp;iei_parsed=1<br /> &nbsp; &nbsp;WHERE&nbsp;iei_parsed=0<br /> &nbsp; &nbsp; &nbsp; &nbsp;AND&nbsp;NOT&nbsp;pagetext&nbsp;LIKE&nbsp;'%[/IMG]%'"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;SQL</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">&#36;mwaimgcache_mwanotforumid&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"AND&nbsp;thread.forumid&nbsp;NOT&nbsp;IN&nbsp;(0)"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;iei_ignore_usersp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"AND&nbsp;post.userid&nbsp;NOT&nbsp;IN&nbsp;(0)"</span><span style="color: #007700">;<br /><br />if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'mwaimgcache_mwanotforumid'</span><span style="color: #007700">])<br />{<br /></span><span style="color: #0000BB">&#36;mwaimgcache_mwanotforumid&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"AND&nbsp;thread.forumid&nbsp;NOT&nbsp;IN&nbsp;("&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'mwaimgcache_mwanotforumid'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">")"</span><span style="color: #007700">;<br />}<br /><br />if&nbsp;(</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'iei_ignore_users'</span><span style="color: #007700">])<br />{<br /></span><span style="color: #0000BB">&#36;iei_ignore_usersp&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"AND&nbsp;post.userid&nbsp;NOT&nbsp;IN&nbsp;("&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #DD0000">'iei_ignore_users'</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">")"</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #FF8000">//&nbsp;For&nbsp;each&nbsp;record&nbsp;with&nbsp;images&nbsp;...<br /></span><span style="color: #0000BB">&#36;cnt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"SELECT&nbsp;post.postid,&nbsp;post.userid,&nbsp;post.dateline,&nbsp;post.pagetext&nbsp;,&nbsp;post.iei_parsed<br /> &nbsp; &nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"post&nbsp;AS&nbsp;post<br /> &nbsp; &nbsp;LEFT&nbsp;JOIN&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"thread&nbsp;AS&nbsp;thread&nbsp;ON(thread.threadid&nbsp;=&nbsp;post.threadid)<br /> &nbsp; &nbsp;WHERE&nbsp;post.iei_parsed=0<br /> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #0000BB">&#36;mwaimgcache_mwanotforumid</span><span style="color: #DD0000"><br /> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #0000BB">&#36;iei_ignore_usersp</span><span style="color: #DD0000"><br /> &nbsp; &nbsp; &nbsp; &nbsp;AND&nbsp;post.pagetext&nbsp;LIKE&nbsp;'%[/IMG]%'<br /> &nbsp; &nbsp;ORDER&nbsp;BY&nbsp;post.dateline&nbsp;DESC"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">&#36;rss&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_read</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;SQL</span><span style="color: #007700">);<br />while(</span><span style="color: #0000BB">&#36;rs&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;rss</span><span style="color: #007700">))<br />{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;cnt</span><span style="color: #007700">++;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;cnt&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">&#36;iei_max_post_count</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;cnt&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Cache&nbsp;registered&nbsp;images<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;images&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">iei_cache_registered_images</span><span style="color: #007700">();<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;pagetext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #DD0000">'pagetext'</span><span style="color: #007700">];<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Find&nbsp;all&nbsp;embedded&nbsp;images<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">preg_match_all</span><span style="color: #007700">(</span><span style="color: #DD0000">'/&#092;[img.*?&#092;](.*?)&#092;[&#092;/img&#092;]/is'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;pagetext</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;matches</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"UPDATE&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"post&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SET&nbsp;iei_parsed=1<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHERE&nbsp;postid=</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #0000BB">postid</span><span style="color: #007700">]</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;SQL</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;changed&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;matches</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]&nbsp;as&nbsp;</span><span style="color: #0000BB">&#36;key&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;error&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Search&nbsp;for&nbsp;images&nbsp;to&nbsp;be&nbsp;ignored<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;ignore&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">foreach(</span><span style="color: #0000BB">&#36;iei_ignore&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">&#36;ivalue</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;value&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;</span><span style="color: #0000BB">&#36;ivalue&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;</span><span style="color: #0000BB">strpos</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;ivalue</span><span style="color: #007700">)&nbsp;!==&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;ignore&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;ignore</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">continue;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;If&nbsp;we&nbsp;haven't&nbsp;got&nbsp;the&nbsp;image&nbsp;yet,&nbsp;download<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;images</span><span style="color: #007700">[</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;value</span><span style="color: #DD0000">"</span><span style="color: #007700">];<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;newimage&nbsp;</span><span style="color: #007700">=&nbsp;!</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">while(</span><span style="color: #0000BB">&#36;newimage</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Get&nbsp;file&nbsp;from&nbsp;remote&nbsp;site<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;contents&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">iei_get_contents</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Missing&nbsp;contents<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;error&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Get&nbsp;file&nbsp;extension<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iei_get_file_extension</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;convert</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">&#36;fileplace</span><span style="color: #007700">=</span><span style="color: #DD0000">"images/imgcache"</span><span style="color: #007700">;<br />@</span><span style="color: #0000BB">watermark</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fileplace</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">,</span><span style="color: #DD0000">'&#36;iei_imported_images_folder/logo.png'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Make&nbsp;path<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;path&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;iei_imported_images_folder&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y/m'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #DD0000">'dateline'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">mkdir</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0755</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Get&nbsp;file&nbsp;index<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">iei_get_file_index</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;path</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;extension</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;See&nbsp;if&nbsp;we&nbsp;have&nbsp;valid&nbsp;contents<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;im&nbsp;</span><span style="color: #007700">=&nbsp;@</span><span style="color: #0000BB">imagecreatefromstring</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;contents</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Missing&nbsp;image&nbsp;or&nbsp;erroneous&nbsp;file&nbsp;image<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;error&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}&nbsp;elseif(</span><span style="color: #0000BB">&#36;convert</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Convert&nbsp;image<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!@</span><span style="color: #0000BB">imagejpeg</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">))<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Error&nbsp;during&nbsp;saving<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;error&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Save&nbsp;it<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(@</span><span style="color: #0000BB">file_put_contents</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;contents</span><span style="color: #007700">)&nbsp;===&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Error&nbsp;during&nbsp;saving<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;error&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">@</span><span style="color: #0000BB">imagedestroy</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;im</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">break;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;error</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Missing&nbsp;image&nbsp;or&nbsp;erroneous&nbsp;file&nbsp;image<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;iei_remove_invalid_images&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;</span><span style="color: #0000BB">&#36;iei_invalid_image_replacement</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;filename&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;iei_invalid_image_replacement</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;error&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;If&nbsp;we&nbsp;have&nbsp;a&nbsp;new&nbsp;image,&nbsp;save&nbsp;it<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;newimage</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;images</span><span style="color: #007700">[</span><span style="color: #DD0000">"</span><span style="color: #0000BB">&#36;value</span><span style="color: #DD0000">"</span><span style="color: #007700">]&nbsp;=&nbsp;</span><span style="color: #0000BB">&#36;bburl&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;filename</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;oldurl&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;newurl&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;images</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"INSERT&nbsp;IGNORE&nbsp;INTO&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"iei_img&nbsp;(<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oldurl,&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;newurl<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;)&nbsp;VALUES&nbsp;(<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'</span><span style="color: #0000BB">&#36;oldurl</span><span style="color: #DD0000">',&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'</span><span style="color: #0000BB">&#36;newurl</span><span style="color: #DD0000">'<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;)"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;SQL</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">if(!</span><span style="color: #0000BB">&#36;error</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #FF8000">//&nbsp;Replace&nbsp;this&nbsp;image<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;changed&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#36;pagetext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">str_replace</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;matches</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">][</span><span style="color: #0000BB">&#36;key</span><span style="color: #007700">],&nbsp;</span><span style="color: #DD0000">'[img]'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">&#36;images</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;value</span><span style="color: #007700">]&nbsp;.&nbsp;</span><span style="color: #DD0000">'[/img]'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;pagetext</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /><br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;changed</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;pagetext&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;pagetext</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"UPDATE&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"post&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SET&nbsp;pagetext='</span><span style="color: #0000BB">&#36;pagetext</span><span style="color: #DD0000">',&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;iei_parsed=1<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHERE&nbsp;postid=</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #0000BB">postid</span><span style="color: #007700">]</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;fmt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'Changed&nbsp;Post:&nbsp;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">else<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"UPDATE&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"post&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SET&nbsp;iei_parsed=1<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHERE&nbsp;postid=</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #0000BB">postid</span><span style="color: #007700">]</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;fmt&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'Unchanged&nbsp;Post:&nbsp;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;fmt&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #DD0000">'&lt;a&nbsp;href="%s/showthread.php?p=%d#post%d"&nbsp;target="_blank"&gt;%d&lt;/a&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;msg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">sprintf</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fmt</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;bburl0</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #DD0000">'postid'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #DD0000">'postid'</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #DD0000">'postid'</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;SQL</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">if(</span><span style="color: #0000BB">&#36;changed</span><span style="color: #007700">)<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">{<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;SQL&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">"DELETE&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FROM&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">TABLE_PREFIX&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"postparsed&nbsp;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;WHERE&nbsp;postid=</span><span style="color: #0000BB">&#36;rs</span><span style="color: #007700">[</span><span style="color: #0000BB">postid</span><span style="color: #007700">]</span><span style="color: #DD0000">"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB"> &nbsp; &nbsp; &nbsp; &nbsp;&#36;vbulletin</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query_write</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;SQL</span><span style="color: #007700">);<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;</span><span style="color: #007700">}<br /></span><span style="color: #0000BB"> &nbsp; &nbsp;log_cron_action</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;msg</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">&#36;nextitem</span><span style="color: #007700">);<br />}&nbsp;<br /></span></code></div></div></div><div style="text-align: center;" class="mycode_align">
وابحث عن كلمة watermark تجد البيانات التي ادرجتها</div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[مشكلة عند تحديث قالب]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56203</link>
			<pubDate>Mon, 30 Mar 2026 11:29:06 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=49603">nnnjk</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56203</guid>
			<description><![CDATA[<div style="text-align: justify;" class="mycode_align"> السلام عليكم  لما اقوم بتحرير قالب عند النقر على تحديث يظهر لي خطأ  صفحة الويب غير متاحة  تعذر تحميل صفحة الويب على <a href="http://domain.site/vb/admincp/index.php?do=list" target="_blank" rel="noopener" class="mycode_url">http://domain.site/vb/admincp/index.php?do=list</a> لأن:  net::ERR_CONNECTION_RESET  يبدوا ان المشكلة في عدم تفعيل الكاش في الاستضافة  قمت بتفعيل بعض الدوال وزيادة حجم الملفات في الرفع عن طريق ملف htaccess فهل هناك دوال يجب ان افعلها في ملف htaccess فهو مسموح لي بااستخدامه<br />
</div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: justify;" class="mycode_align"> السلام عليكم  لما اقوم بتحرير قالب عند النقر على تحديث يظهر لي خطأ  صفحة الويب غير متاحة  تعذر تحميل صفحة الويب على <a href="http://domain.site/vb/admincp/index.php?do=list" target="_blank" rel="noopener" class="mycode_url">http://domain.site/vb/admincp/index.php?do=list</a> لأن:  net::ERR_CONNECTION_RESET  يبدوا ان المشكلة في عدم تفعيل الكاش في الاستضافة  قمت بتفعيل بعض الدوال وزيادة حجم الملفات في الرفع عن طريق ملف htaccess فهل هناك دوال يجب ان افعلها في ملف htaccess فهو مسموح لي بااستخدامه<br />
</div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[مطلوب كتاب لتعليم php]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=55525</link>
			<pubDate>Fri, 14 Nov 2025 08:46:28 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=32019">dasktop</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=55525</guid>
			<description><![CDATA[مرحبا <br />
<br />
مطلوب كتاب لتعليم لغة ال php]]></description>
			<content:encoded><![CDATA[مرحبا <br />
<br />
مطلوب كتاب لتعليم لغة ال php]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[[php] - كيف نكتب نص معين ضمن احدى وسوم الـhtml]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=51634</link>
			<pubDate>Wed, 12 Feb 2025 15:24:51 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=56138">justforit</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=51634</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله و بركاته </div>
<div style="text-align: center;" class="mycode_align">كيف نعبئ نص او نكتب نص في احد وسوم الـhtml </div>
<div style="text-align: center;" class="mycode_align">مثلا</div>
<div style="text-align: center;" class="mycode_align">&lt;div name="d1" &gt;&lt;/div&gt;</div>
<div style="text-align: center;" class="mycode_align">بفيجوال بيسك و سي شارب وجافاسكريبت الامر سهل لكن php كيف يكون الكود</div>
<div style="text-align: center;" class="mycode_align">اقصد وسوم موجودة مسبقا و ليس انشاءها عبر echo</div>
<div style="text-align: center;" class="mycode_align">شكر الله لكم جميعا</div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله و بركاته </div>
<div style="text-align: center;" class="mycode_align">كيف نعبئ نص او نكتب نص في احد وسوم الـhtml </div>
<div style="text-align: center;" class="mycode_align">مثلا</div>
<div style="text-align: center;" class="mycode_align">&lt;div name="d1" &gt;&lt;/div&gt;</div>
<div style="text-align: center;" class="mycode_align">بفيجوال بيسك و سي شارب وجافاسكريبت الامر سهل لكن php كيف يكون الكود</div>
<div style="text-align: center;" class="mycode_align">اقصد وسوم موجودة مسبقا و ليس انشاءها عبر echo</div>
<div style="text-align: center;" class="mycode_align">شكر الله لكم جميعا</div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[خطا في تشغيل مجلد phpmyadmin على سيرفر iis]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=51585</link>
			<pubDate>Tue, 11 Feb 2025 22:07:18 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=56138">justforit</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=51585</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله وبركاته</div>
<div style="text-align: center;" class="mycode_align">فجاة ظهرت رسالة الخطا وقمت بكل المحاولات للتصحيح والبجث ولم تجد نفعا  وقمت بتثبيت ويندوز من جديد بلا فائدة</div>
<div style="text-align: center;" class="mycode_align">التالي شيء من رسائل الخطا اللتي ملات شاشة الكمبيوتر او المتصفح:</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">PHP&nbsp;Deprecated</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB"> Safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql_connect</span><span style="color: #007700">():&nbsp;</span><span style="color: #0000BB">Implicitly&nbsp;marking&nbsp;parameter&nbsp;&#36;servername&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">nullable&nbsp;is&nbsp;deprecated</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">the&nbsp;explicit&nbsp;nullable&nbsp;type&nbsp;must&nbsp;be&nbsp;used&nbsp;instead&nbsp;in&nbsp;C</span><span style="color: #007700">:&#092;</span><span style="color: #0000BB">inetpub</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">wwwroot</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">phpMyAdmin</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">vendor</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">thecodingmachine</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">deprecated</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql</span><span style="color: #007700">.</span><span style="color: #0000BB">php&nbsp;on&nbsp;line&nbsp;100<br />PHP&nbsp;Deprecated</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB"> Safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql_connect</span><span style="color: #007700">():&nbsp;</span><span style="color: #0000BB">Implicitly&nbsp;marking&nbsp;parameter&nbsp;&#36;username&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">nullable&nbsp;is&nbsp;deprecated</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">the&nbsp;explicit&nbsp;nullable&nbsp;type&nbsp;must&nbsp;be&nbsp;used&nbsp;instead&nbsp;in&nbsp;C</span><span style="color: #007700">:&#092;</span><span style="color: #0000BB">inetpub</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">wwwroot</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">phpMyAdmin</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">vendor</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">thecodingmachine</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">deprecated</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql</span><span style="color: #007700">.</span><span style="color: #0000BB">php&nbsp;on&nbsp;line&nbsp;100<br />PHP&nbsp;Deprecated</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB"> Safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql_connect</span><span style="color: #007700">():&nbsp;</span><span style="color: #0000BB">Implicitly&nbsp;marking&nbsp;parameter&nbsp;&#36;password&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">nullable&nbsp;is&nbsp;deprecated</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">the&nbsp;explicit&nbsp;nullable&nbsp;type&nbsp;must&nbsp;be&nbsp;used&nbsp;instead&nbsp;in&nbsp;C</span><span style="color: #007700">:&#092;</span><span style="color: #0000BB">inetpub</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">wwwroot</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">phpMyAdmin</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">vendor</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">thecodingmachine</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">deprecated</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql</span><span style="color: #007700">.</span><span style="color: #0000BB">php&nbsp;on&nbsp;line&nbsp;100<br />PHP&nbsp;Deprecated</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB"> Safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql_pconnect</span><span style="color: #007700">():&nbsp;</span><span style="color: #0000BB">Implicitly&nbsp;marking&nbsp;parameter&nbsp;&#36;servername&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">nullable&nbsp;is&nbsp;deprecated</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">the&nbsp;explicit&nbsp;nullable&nbsp;type&nbsp;must&nbsp;be&nbsp;used&nbsp;instead&nbsp;in&nbsp;C</span><span style="color: #007700">:&#092;</span><span style="color: #0000BB">inetpub</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">wwwroot</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">phpMyAdmin</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">vendor</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">thecodingmachine</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">deprecated</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql</span><span style="color: #007700">.</span><span style="color: #0000BB">php&nbsp;on&nbsp;line&nbsp;333<br />PHP&nbsp;Deprecated</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB"> Safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql_pconnect</span><span style="color: #007700">():&nbsp;</span><span style="color: #0000BB">Implicitly&nbsp;marking&nbsp;parameter&nbsp;&#36;username&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">nullable&nbsp;is&nbsp;deprecated</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">the&nbsp;explicit&nbsp;nullable&nbsp;type&nbsp;must&nbsp;be&nbsp;used&nbsp;instead&nbsp;in&nbsp;C</span><span style="color: #007700">:&#092;</span><span style="color: #0000BB">inetpub</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">wwwroot</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">phpMyAdmin</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">vendor</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">thecodingmachine</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">deprecated</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql</span><span style="color: #007700">.</span><span style="color: #0000BB">php&nbsp;on&nbsp;line&nbsp;333<br />P&nbsp;<br /></span></code></div></div></div>كل الاصدارات باحدث نسخة سواءا mysql php حتى هذي phpmyadmin]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله وبركاته</div>
<div style="text-align: center;" class="mycode_align">فجاة ظهرت رسالة الخطا وقمت بكل المحاولات للتصحيح والبجث ولم تجد نفعا  وقمت بتثبيت ويندوز من جديد بلا فائدة</div>
<div style="text-align: center;" class="mycode_align">التالي شيء من رسائل الخطا اللتي ملات شاشة الكمبيوتر او المتصفح:</div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">PHP&nbsp;Deprecated</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB"> Safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql_connect</span><span style="color: #007700">():&nbsp;</span><span style="color: #0000BB">Implicitly&nbsp;marking&nbsp;parameter&nbsp;&#36;servername&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">nullable&nbsp;is&nbsp;deprecated</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">the&nbsp;explicit&nbsp;nullable&nbsp;type&nbsp;must&nbsp;be&nbsp;used&nbsp;instead&nbsp;in&nbsp;C</span><span style="color: #007700">:&#092;</span><span style="color: #0000BB">inetpub</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">wwwroot</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">phpMyAdmin</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">vendor</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">thecodingmachine</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">deprecated</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql</span><span style="color: #007700">.</span><span style="color: #0000BB">php&nbsp;on&nbsp;line&nbsp;100<br />PHP&nbsp;Deprecated</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB"> Safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql_connect</span><span style="color: #007700">():&nbsp;</span><span style="color: #0000BB">Implicitly&nbsp;marking&nbsp;parameter&nbsp;&#36;username&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">nullable&nbsp;is&nbsp;deprecated</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">the&nbsp;explicit&nbsp;nullable&nbsp;type&nbsp;must&nbsp;be&nbsp;used&nbsp;instead&nbsp;in&nbsp;C</span><span style="color: #007700">:&#092;</span><span style="color: #0000BB">inetpub</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">wwwroot</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">phpMyAdmin</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">vendor</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">thecodingmachine</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">deprecated</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql</span><span style="color: #007700">.</span><span style="color: #0000BB">php&nbsp;on&nbsp;line&nbsp;100<br />PHP&nbsp;Deprecated</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB"> Safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql_connect</span><span style="color: #007700">():&nbsp;</span><span style="color: #0000BB">Implicitly&nbsp;marking&nbsp;parameter&nbsp;&#36;password&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">nullable&nbsp;is&nbsp;deprecated</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">the&nbsp;explicit&nbsp;nullable&nbsp;type&nbsp;must&nbsp;be&nbsp;used&nbsp;instead&nbsp;in&nbsp;C</span><span style="color: #007700">:&#092;</span><span style="color: #0000BB">inetpub</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">wwwroot</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">phpMyAdmin</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">vendor</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">thecodingmachine</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">deprecated</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql</span><span style="color: #007700">.</span><span style="color: #0000BB">php&nbsp;on&nbsp;line&nbsp;100<br />PHP&nbsp;Deprecated</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB"> Safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql_pconnect</span><span style="color: #007700">():&nbsp;</span><span style="color: #0000BB">Implicitly&nbsp;marking&nbsp;parameter&nbsp;&#36;servername&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">nullable&nbsp;is&nbsp;deprecated</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">the&nbsp;explicit&nbsp;nullable&nbsp;type&nbsp;must&nbsp;be&nbsp;used&nbsp;instead&nbsp;in&nbsp;C</span><span style="color: #007700">:&#092;</span><span style="color: #0000BB">inetpub</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">wwwroot</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">phpMyAdmin</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">vendor</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">thecodingmachine</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">deprecated</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql</span><span style="color: #007700">.</span><span style="color: #0000BB">php&nbsp;on&nbsp;line&nbsp;333<br />PHP&nbsp;Deprecated</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB"> Safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql_pconnect</span><span style="color: #007700">():&nbsp;</span><span style="color: #0000BB">Implicitly&nbsp;marking&nbsp;parameter&nbsp;&#36;username&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">nullable&nbsp;is&nbsp;deprecated</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">the&nbsp;explicit&nbsp;nullable&nbsp;type&nbsp;must&nbsp;be&nbsp;used&nbsp;instead&nbsp;in&nbsp;C</span><span style="color: #007700">:&#092;</span><span style="color: #0000BB">inetpub</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">wwwroot</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">phpMyAdmin</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">vendor</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">thecodingmachine</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">safe</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">deprecated</span><span style="color: #007700">&#092;</span><span style="color: #0000BB">mssql</span><span style="color: #007700">.</span><span style="color: #0000BB">php&nbsp;on&nbsp;line&nbsp;333<br />P&nbsp;<br /></span></code></div></div></div>كل الاصدارات باحدث نسخة سواءا mysql php حتى هذي phpmyadmin]]></content:encoded>
		</item>
	</channel>
</rss>