<?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[منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب  - كل الأقسام]]></title>
		<link>https://vb4arb.com/vb/</link>
		<description><![CDATA[منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب  - https://vb4arb.com/vb]]></description>
		<pubDate>Wed, 22 Apr 2026 10:51:35 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[سؤولان هامان  في الداتا جريد فيو]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56242</link>
			<pubDate>Mon, 20 Apr 2026 20:04:47 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=20087">yosif</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56242</guid>
			<description><![CDATA[<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">السلام علكيم</span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">معي داتا جريد فيو : وبدون الارتباط بجدول في قاعدة البيانات</span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">فيها عمودين اثنين  هما :              من رقم             الى رقم</span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">                  السجل الاول  مثلا:   من رقم = 1       الى رقم   = 2</span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">                 السجل الثاني                     = 3                     =4</span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">                السجل الثالث                      = 5                    =6    </span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">المطلوب</span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">1- كود يقوم بالاتي : في بداية خلية السجل الثاني كيف يتم اضافة رقم تلقائي  لثصبح (3)    بزيادة واحد  لان خلية السجل السابق انتهى برقم(2)</span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">                         وعند الانتقال الى خلية السجل الثالث يتم اضافة رقم تلقائي لثصبح (5) لان خلية السجل السابق انتهى برقم (4) </span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">2- كود لعدم الانتقال الى خلية جديدة في الداتا جريد فيو الا بعد تعبئة الخلية السابقة </span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">بارك الله فيكم</span>]]></description>
			<content:encoded><![CDATA[<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">السلام علكيم</span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">معي داتا جريد فيو : وبدون الارتباط بجدول في قاعدة البيانات</span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">فيها عمودين اثنين  هما :              من رقم             الى رقم</span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">                  السجل الاول  مثلا:   من رقم = 1       الى رقم   = 2</span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">                 السجل الثاني                     = 3                     =4</span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">                السجل الثالث                      = 5                    =6    </span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">المطلوب</span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">1- كود يقوم بالاتي : في بداية خلية السجل الثاني كيف يتم اضافة رقم تلقائي  لثصبح (3)    بزيادة واحد  لان خلية السجل السابق انتهى برقم(2)</span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">                         وعند الانتقال الى خلية السجل الثالث يتم اضافة رقم تلقائي لثصبح (5) لان خلية السجل السابق انتهى برقم (4) </span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">2- كود لعدم الانتقال الى خلية جديدة في الداتا جريد فيو الا بعد تعبئة الخلية السابقة </span><br />
<span style="font-family: 'Droid Arabic Naskh', 'Lucida Grande', Tahoma, 'Trebuchet MS', Verdana, Arial, sans-serif;" class="mycode_font">بارك الله فيكم</span>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[سؤالين  في الداتا جريد فيو]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56233</link>
			<pubDate>Fri, 17 Apr 2026 07:16:04 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=20087">yosif</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56233</guid>
			<description><![CDATA[السلام علكيم<br />
مع داتا جريد فيو : وبدون الارتباط بجدول في قاعدة البيانات<br />
فيها عمودين اثنين  هما :              من رقم             الى رقم<br />
                  السجل الاول  مثلا:   من رقم = 1       الى رقم   = 2<br />
                 السجل الثاني                     = 3                     =4<br />
                السجل الثالث                      = 5                    =6    <br />
المطلوب<br />
1- كود يقوم بالاتي : في السجل الثاني كيف يتم اضافة رقم تلقائي  لثصبح (3)    بزيادة واحد  لان السجل السجل السابق انتهى برقم(2)<br />
                         وعند الانتقال الى السجل الثالث يتم اضافة رقم تلقائي لثصبح (5) لان السجل السابق انتهى برقم (4) <br />
2- كود لعدم الانتقال الى سطر جديد في الداتا جريد فيو الا بعد تعبئة السجل السابق<br />
بارك الله فيكم]]></description>
			<content:encoded><![CDATA[السلام علكيم<br />
مع داتا جريد فيو : وبدون الارتباط بجدول في قاعدة البيانات<br />
فيها عمودين اثنين  هما :              من رقم             الى رقم<br />
                  السجل الاول  مثلا:   من رقم = 1       الى رقم   = 2<br />
                 السجل الثاني                     = 3                     =4<br />
                السجل الثالث                      = 5                    =6    <br />
المطلوب<br />
1- كود يقوم بالاتي : في السجل الثاني كيف يتم اضافة رقم تلقائي  لثصبح (3)    بزيادة واحد  لان السجل السجل السابق انتهى برقم(2)<br />
                         وعند الانتقال الى السجل الثالث يتم اضافة رقم تلقائي لثصبح (5) لان السجل السابق انتهى برقم (4) <br />
2- كود لعدم الانتقال الى سطر جديد في الداتا جريد فيو الا بعد تعبئة السجل السابق<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=56229</link>
			<pubDate>Wed, 15 Apr 2026 20:09:22 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=20087">yosif</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56229</guid>
			<description><![CDATA[السلام عليكم <br />
اذا كان بالإمكان كود بلغة فيجوال دوت نت  وبدون وبدون استخدام برامج وسيطة كما في نظام الاودو المصمم بلغة اوراكل دفلوبر<br />
اريد تصميم برنامج خاص بفواتير الكهرباء <br />
يحول الصورة الى ارقام<br />
بمعنى عند اخذ صورة العداد بالتلفون يتم تحويله  الى ارقام ليتم تخزينه فيما بعد في الجدول<br />
اعلم ان هذا الكود صعب ، لكن الله يسهل  لكم ولي عمل ذلك<br />
بارك الله فيكم]]></description>
			<content:encoded><![CDATA[السلام عليكم <br />
اذا كان بالإمكان كود بلغة فيجوال دوت نت  وبدون وبدون استخدام برامج وسيطة كما في نظام الاودو المصمم بلغة اوراكل دفلوبر<br />
اريد تصميم برنامج خاص بفواتير الكهرباء <br />
يحول الصورة الى ارقام<br />
بمعنى عند اخذ صورة العداد بالتلفون يتم تحويله  الى ارقام ليتم تخزينه فيما بعد في الجدول<br />
اعلم ان هذا الكود صعب ، لكن الله يسهل  لكم ولي عمل ذلك<br />
بارك الله فيكم]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[شراء سورس كود]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56228</link>
			<pubDate>Mon, 13 Apr 2026 19:18:32 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=15374">sher</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56228</guid>
			<description><![CDATA[ابحث عن سورس كود برنامج ادارة محلات الصرافة <br />
<br />
للتواصل معي 00963992295734]]></description>
			<content:encoded><![CDATA[ابحث عن سورس كود برنامج ادارة محلات الصرافة <br />
<br />
للتواصل معي 00963992295734]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[سؤال بخصوص الترقيم التلقائي اليدوي]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56227</link>
			<pubDate>Sun, 12 Apr 2026 21:56:05 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=20087">yosif</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56227</guid>
			<description><![CDATA[السلام عليكم<br />
لدي مثلا تكست بوكس من رقم <br />
وتكست ثاني الى رقم<br />
وتكست ثالث مقدار الزيادة<br />
المطلوب<br />
عند كتابة رقم 1 مثلا في تكست من رقم<br />
وكتابة رقم 5 مثلا في تكست الى رقم<br />
وكتابة رقم 1 في تكست مقدار الزيادة<br />
يظهر في الداتا جريد فيو في العمود الثالث الارقام متسلسلة 1  2  3  4   5<br />
بحثت كثيرا في مواقع اجنبية ولم اجد الكود الذي يقوم بذلك<br />
وجزاكم الله كل خير]]></description>
			<content:encoded><![CDATA[السلام عليكم<br />
لدي مثلا تكست بوكس من رقم <br />
وتكست ثاني الى رقم<br />
وتكست ثالث مقدار الزيادة<br />
المطلوب<br />
عند كتابة رقم 1 مثلا في تكست من رقم<br />
وكتابة رقم 5 مثلا في تكست الى رقم<br />
وكتابة رقم 1 في تكست مقدار الزيادة<br />
يظهر في الداتا جريد فيو في العمود الثالث الارقام متسلسلة 1  2  3  4   5<br />
بحثت كثيرا في مواقع اجنبية ولم اجد الكود الذي يقوم بذلك<br />
وجزاكم الله كل خير]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[خطأ بسيط في كود الجافا بحاجه الى تعديل]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56226</link>
			<pubDate>Sun, 12 Apr 2026 08:25: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=56226</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
اخوتي الاعزاء<br />
ركبت صفحة html لعرض وقت الصلاة تعتمد على كود جافا<br />
لاكن هناك خطأ بسيط في عرض التاريخ<br />
فمثلا تاريخ اليوم الميلادي <br />
يظهر بالشكل كما في الصوره<br />
وعند نسخ التاريخ المعروض يطبع بالشكل الصحيح<br />
يبدوا بحاجة الى تغيير اتجاه التاريخ<br />
السكربت مرفق<br />
</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=30178" target="_blank" title="">Screenshot_٢٠٢٦-٠٤-١٢-١١-١٢-٤٠.png</a> (الحجم : 120.41 ك ب / التحميلات : 27)
<br />
<br />
<img src="https://vb4arb.com/vb/images/attachtypes/zip.gif" title="ZIP File" border="0" alt=".zip" />
&nbsp;&nbsp;<a class="attachembed" href="attachment.php?aid=30177" target="_blank" title="">prayertime.zip</a> (الحجم : 5.8 ك ب / التحميلات : 3)
]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم<br />
اخوتي الاعزاء<br />
ركبت صفحة html لعرض وقت الصلاة تعتمد على كود جافا<br />
لاكن هناك خطأ بسيط في عرض التاريخ<br />
فمثلا تاريخ اليوم الميلادي <br />
يظهر بالشكل كما في الصوره<br />
وعند نسخ التاريخ المعروض يطبع بالشكل الصحيح<br />
يبدوا بحاجة الى تغيير اتجاه التاريخ<br />
السكربت مرفق<br />
</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=30178" target="_blank" title="">Screenshot_٢٠٢٦-٠٤-١٢-١١-١٢-٤٠.png</a> (الحجم : 120.41 ك ب / التحميلات : 27)
<br />
<br />
<img src="https://vb4arb.com/vb/images/attachtypes/zip.gif" title="ZIP File" border="0" alt=".zip" />
&nbsp;&nbsp;<a class="attachembed" href="attachment.php?aid=30177" target="_blank" title="">prayertime.zip</a> (الحجم : 5.8 ك ب / التحميلات : 3)
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[إدخال بيانات على قاعدة بيانات باستخدام اكسيل]]></title>
			<link>https://vb4arb.com/vb/showthread.php?tid=56225</link>
			<pubDate>Sun, 12 Apr 2026 06:18:27 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://vb4arb.com/vb/member.php?action=profile&uid=585">aboezzat84</a>]]></dc:creator>
			<guid isPermaLink="false">https://vb4arb.com/vb/showthread.php?tid=56225</guid>
			<description><![CDATA[السلام عليكم <br />
لدى برنامج VB6+Access<br />
كيف يمكن إدخال مجموعة بيانات من خلال Excel Sheet template إلى قاعدة البيانات <br />
بمعنى : <br />
1- يتم إعداد البيانات المطلوبة فى Excel sheet template <br />
2- من خلال شاشة البرناج يتم تحديد مكان ال template ورفعها على قاعدة البيانات]]></description>
			<content:encoded><![CDATA[السلام عليكم <br />
لدى برنامج VB6+Access<br />
كيف يمكن إدخال مجموعة بيانات من خلال Excel Sheet template إلى قاعدة البيانات <br />
بمعنى : <br />
1- يتم إعداد البيانات المطلوبة فى Excel sheet template <br />
2- من خلال شاشة البرناج يتم تحديد مكان ال template ورفعها على قاعدة البيانات]]></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=56223</link>
			<pubDate>Fri, 10 Apr 2026 20:58: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=56223</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله وبركاته<br />
اريد من الاخوه الاعزاء في هذا المنتدى المبارك عموما <br />
ومن الاخ Amir_Alzubidy مساعدتي في تعديل هذا الكود<br />
والخطأ هو انه يظيف رابط موقعي الى الى الرابط المدخل ولايضيف علامة : الى الكود الاساسي والكود الاساسي هو </div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">view</span><span style="color: #007700">-</span><span style="color: #0000BB">source</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>view-source:domain.site</code></div></div>ولاكن عند ادخال الرابط والدخول اليه يعطيني بالشكل التالي<br />
<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code>http://alshafeen.site/view-sourcedomain.site</code></div></div>وهذا الكود كامل المراد تعديله<br />
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">ادخل&nbsp;رابط&nbsp;الصفحه&nbsp;في&nbsp;الحقل</span><span style="color: #007700">(</span><span style="color: #0000BB">بدون&nbsp;متغير&nbsp;http</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">ثم&nbsp;اظغط&nbsp;على&nbsp;انقر<br /></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">input&nbsp;id</span><span style="color: #007700">=</span><span style="color: #DD0000">"in"&nbsp;</span><span style="color: #0000BB">name</span><span style="color: #007700">=</span><span style="color: #DD0000">"in"</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">input&nbsp;onclick</span><span style="color: #007700">=</span><span style="color: #DD0000">"Go_to()"&nbsp;</span><span style="color: #0000BB">type</span><span style="color: #007700">=</span><span style="color: #DD0000">"button"&nbsp;</span><span style="color: #0000BB">value</span><span style="color: #007700">=</span><span style="color: #DD0000">"انقر"</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">script</span><span style="color: #007700">&gt;<br />function&nbsp;</span><span style="color: #0000BB">Go_to</span><span style="color: #007700">()&nbsp;{<br />var&nbsp;</span><span style="color: #0000BB">g&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">document</span><span style="color: #007700">.</span><span style="color: #0000BB">getElementById</span><span style="color: #007700">(</span><span style="color: #DD0000">"in"</span><span style="color: #007700">);<br />var&nbsp;</span><span style="color: #0000BB">redirecturl</span><span style="color: #007700">=</span><span style="color: #DD0000">"view-source"</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">g</span><span style="color: #007700">.</span><span style="color: #0000BB">value</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">window</span><span style="color: #007700">.</span><span style="color: #0000BB">location</span><span style="color: #007700">=</span><span style="color: #0000BB">redirecturl</span><span style="color: #007700">;<br />}<br />&lt;/</span><span style="color: #0000BB">script</span><span style="color: #007700">&gt;&nbsp;<br /></span></code></div></div></div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">السلام عليكم ورحمة الله وبركاته<br />
اريد من الاخوه الاعزاء في هذا المنتدى المبارك عموما <br />
ومن الاخ Amir_Alzubidy مساعدتي في تعديل هذا الكود<br />
والخطأ هو انه يظيف رابط موقعي الى الى الرابط المدخل ولايضيف علامة : الى الكود الاساسي والكود الاساسي هو </div>
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">view</span><span style="color: #007700">-</span><span style="color: #0000BB">source</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>view-source:domain.site</code></div></div>ولاكن عند ادخال الرابط والدخول اليه يعطيني بالشكل التالي<br />
<div class="codeblock"><div class="title">كود :</div><div class="body" dir="ltr"><code>http://alshafeen.site/view-sourcedomain.site</code></div></div>وهذا الكود كامل المراد تعديله<br />
<div class="codeblock phpcodeblock"><div class="title">PHP كود :</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">ادخل&nbsp;رابط&nbsp;الصفحه&nbsp;في&nbsp;الحقل</span><span style="color: #007700">(</span><span style="color: #0000BB">بدون&nbsp;متغير&nbsp;http</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB">ثم&nbsp;اظغط&nbsp;على&nbsp;انقر<br /></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">input&nbsp;id</span><span style="color: #007700">=</span><span style="color: #DD0000">"in"&nbsp;</span><span style="color: #0000BB">name</span><span style="color: #007700">=</span><span style="color: #DD0000">"in"</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">input&nbsp;onclick</span><span style="color: #007700">=</span><span style="color: #DD0000">"Go_to()"&nbsp;</span><span style="color: #0000BB">type</span><span style="color: #007700">=</span><span style="color: #DD0000">"button"&nbsp;</span><span style="color: #0000BB">value</span><span style="color: #007700">=</span><span style="color: #DD0000">"انقر"</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">script</span><span style="color: #007700">&gt;<br />function&nbsp;</span><span style="color: #0000BB">Go_to</span><span style="color: #007700">()&nbsp;{<br />var&nbsp;</span><span style="color: #0000BB">g&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">document</span><span style="color: #007700">.</span><span style="color: #0000BB">getElementById</span><span style="color: #007700">(</span><span style="color: #DD0000">"in"</span><span style="color: #007700">);<br />var&nbsp;</span><span style="color: #0000BB">redirecturl</span><span style="color: #007700">=</span><span style="color: #DD0000">"view-source"</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">g</span><span style="color: #007700">.</span><span style="color: #0000BB">value</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">window</span><span style="color: #007700">.</span><span style="color: #0000BB">location</span><span style="color: #007700">=</span><span style="color: #0000BB">redirecturl</span><span style="color: #007700">;<br />}<br />&lt;/</span><span style="color: #0000BB">script</span><span style="color: #007700">&gt;&nbsp;<br /></span></code></div></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>
	</channel>
</rss>