<?xml version="1.0" encoding="utf-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DaniWeb IT Discussion Community</title>
		<link>http://www.daniweb.com/forums/</link>
		<description>Tech support, programming, web development, and internet marketing community. Forums to get free computer help and support.</description>
		<language>en-US</language>
		<lastBuildDate>Mon, 30 Nov 2009 20:22:44 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.daniweb.com/alphaimages/misc/rss.jpg</url>
			<title>DaniWeb IT Discussion Community</title>
			<link>http://www.daniweb.com/forums/</link>
		</image>
		<item>
			<title>script works in firefox but not IE7</title>
			<link>http://www.daniweb.com/forums/thread242298.html</link>
			<pubDate>Sun, 29 Nov 2009 23:23:05 GMT</pubDate>
			<description><![CDATA[I have a simple gallery script in flash that has a php admin. The login works in firefox but no IE it redirects you right back to the login page can anyone figure this out it's 3 files index.php admin.php config.php the index.php redirects you to admin.php. 
 
index.php 
 
  <div class="codeblock">...]]></description>
			<content:encoded><![CDATA[<div>I have a simple gallery script in flash that has a php admin. The login works in firefox but no IE it redirects you right back to the login page can anyone figure this out it's 3 files index.php admin.php config.php the index.php redirects you to admin.php.<br />
<br />
index.php<br />
<br />
 <pre style="margin:20px; line-height:13px">&lt;?<br />
&nbsp; &nbsp; &nbsp; &nbsp; $login=$_POST['login'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; $pass=$_POST['pass'];<br />
if (!isset($login)&amp;&amp;!isset($pass)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; print'&lt;html&gt;&lt;link href=&quot;main.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;body style=&quot;background-color: #161616;&quot;&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; print'&lt;table width=&quot;100%&quot; height=&quot;100%&quot; border=&quot;0&quot;&gt;&lt;tr&gt;&lt;td valign=&quot;middle&quot;&nbsp; style=&quot;color:#FFFFFF;font-family: Tahoma; font-size:11px &quot; align=&quot;center&quot;&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; print'&lt;img src=&quot;pics/text_top.jpg&quot; border=&quot;0&quot;&gt;&lt;br&gt;&lt;br&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; print'&lt;img src=&quot;pics/logo.jpg&quot; border=&quot;0&quot;&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; print'&lt;form action=&quot;index.php&quot; method=&quot;post&quot;&gt;';<br />
&nbsp; &nbsp; print '&lt;strong&gt;Login:&lt;/strong&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;input name=&quot;login&quot; type=&quot;text&quot; maxlength=&quot;16&quot;&nbsp; style=&quot;border-color:#777777; border-width:1px; border-style:solid; background-color:#000000; color:#777777 &quot;/&gt;&lt;br&gt;&lt;br&gt;';<br />
&nbsp; &nbsp; print '&lt;strong&gt;Password:&lt;/strong&gt; &amp;nbsp;&amp;nbsp;&lt;input name=&quot;pass&quot; type=&quot;password&quot; maxlength=&quot;16&quot;&nbsp; style=&quot;border-color:#777777; border-width:1px; border-style:solid; background-color:#000000; color:#777777 &quot;/&gt;&lt;br&gt;&lt;br&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; print'&lt;input name=&quot;ENTER&quot; type=&quot;submit&quot; value=&quot;&quot; style=&quot;width:78px; height:21px; border-width:0px; border-style:solid; background-image:url(pics/submit.jpg)&quot;/&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; print'&lt;/form&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; print'&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&lt;/html&gt;';<br />
} else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; $login = str_replace(&quot;'&quot;, &quot;&quot;, $login);<br />
&nbsp; &nbsp; &nbsp; &nbsp; $login = substr($login,0,16);<br />
&nbsp; &nbsp; &nbsp; &nbsp; require (&quot;config.php&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; $a1=strcmp($admin_login,$login);unset($admin_login);<br />
&nbsp; &nbsp; &nbsp; &nbsp; $a2=strcmp($admin_pass,$pass);unset($admin_pass);<br />
&nbsp; &nbsp; &nbsp; &nbsp; $COOKIE_LOGIN_NAME='login';<br />
&nbsp; &nbsp; &nbsp; &nbsp; $COOKIE_PASSW_NAME='pass';<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (($a1==0)&amp;&amp;($a2==0)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setcookie($COOKIE_LOGIN_NAME, $login, time()+3600);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setcookie($COOKIE_PASSW_NAME, md5($pass), time()+3600);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; header(&quot;Location: admin.php&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit;<br />
&nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unset($pass);unset($login);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setcookie($COOKIE_LOGIN_NAME, '', time()+3600);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setcookie($COOKIE_PASSW_NAME, '', time()+3600);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; header(&quot;Location: index.php&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
}<br />
print &quot;&lt;noscript&gt;&quot;;<br />
?&gt;</pre><br />
admin.php<br />
<br />
 <pre style="margin:20px; line-height:13px">&lt;?<br />
&nbsp; &nbsp; &nbsp; &nbsp; require (&quot;config.php&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; $COOKIE_LOGIN_NAME='login';<br />
&nbsp; &nbsp; &nbsp; &nbsp; $COOKIE_PASSW_NAME='pass';<br />
&nbsp; &nbsp; &nbsp; &nbsp; $login = $_COOKIE[$COOKIE_LOGIN_NAME];<br />
&nbsp; &nbsp; &nbsp; &nbsp; $pass = $_COOKIE[$COOKIE_PASSW_NAME];<br />
&nbsp; &nbsp; &nbsp; &nbsp; $a1=strcmp($admin_login,$login);unset($admin_login);<br />
&nbsp; &nbsp; &nbsp; &nbsp; $a2=strcmp(md5($admin_pass),$pass);unset($admin_pass);<br />
if (($a1!=0)or($a2!=0)) {<br />
&nbsp; &nbsp; &nbsp; header(&quot;Location: index.php&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; exit;<br />
} else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; Header('Cache-Control: no-cache, must-revalidate');<br />
&nbsp; &nbsp; &nbsp; &nbsp; Header('Pragma: no-cache');<br />
&nbsp; &nbsp; &nbsp; &nbsp; Header('Expires: Mon,26 Jul 1980 05:00:00 GMT');<br />
&nbsp; &nbsp; &nbsp; &nbsp; include(&quot;inc/header.php&quot;);<br />
$edit_dir=$_GET['edit_dir'];<br />
$dir_selected=0;<br />
if ($_GET['dir_selected']) {$dir_selected=$_GET['dir_selected'];};<br />
if ($_POST['dir_selected']) {$dir_selected=$_POST['dir_selected'];};<br />
<br />
if ($edit_dir!='') {<br />
&nbsp; &nbsp; &nbsp; &nbsp; print '&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;color:#ffffff&quot;&gt;'.&quot;\n&quot;;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; print &quot;&lt;form action=\&quot;admin.php\&quot; method=\&quot;post\&quot;&gt;\n&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; print &quot;Category to rename:&lt;br /&gt;\n&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; print &quot;&lt;b&gt;$edit_dir&lt;/b&gt;&lt;br /&gt;\n&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; print &quot;&lt;input name=\&quot;ren_dir\&quot; type=\&quot;hidden\&quot; value=\&quot;$edit_dir\&quot; /&gt;&lt;br /&gt;\n&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; print &quot;New category name:&lt;br /&gt;\n&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; print &quot;&lt;input name=\&quot;ren_dir2\&quot; type=\&quot;text\&quot; /&gt;&lt;br /&gt;\n&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; print &quot;&lt;input type=\&quot;submit\&quot; /&gt;&lt;/form&gt;\n&quot;;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; print &quot;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;\n&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; print &quot;&lt;/body&gt;&lt;/html&gt;&quot;;<br />
} else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; include(&quot;inc/top.php&quot;);<br />
<br />
// rename category<br />
&nbsp; &nbsp; &nbsp; &nbsp; $ren_dir=$_POST['ren_dir'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; $ren_dir2=$_POST['ren_dir2'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (($ren_dir!='')&amp;&amp;($ren_dir2!='')) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rename($gallery_path.&quot;/&quot;.$ren_dir, $gallery_path.&quot;/&quot;.$ren_dir2);<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
// add new category<br />
&nbsp; &nbsp; &nbsp; &nbsp; $new_dir=$_POST['new_dir'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (($new_dir!='')&amp;&amp;(!is_dir($gallery_path.&quot;/&quot;.$new_dir))) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mkdir($gallery_path.&quot;/&quot;.$new_dir, 0777);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mkdir($gallery_path.&quot;/&quot;.$new_dir.&quot;/pix&quot;, 0777);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mkdir($gallery_path.&quot;/&quot;.$new_dir.&quot;/thumbs&quot;, 0777);<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
// delete category<br />
&nbsp; &nbsp; &nbsp; &nbsp; $del_dir=$_GET['del_dir'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (($del_dir!='')&amp;&amp;(is_dir($gallery_path.&quot;/&quot;.$del_dir))) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $Open=opendir($gallery_path.&quot;/&quot;.$del_dir.&quot;/thumbs&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($Open) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while ($Files=readdir($Open)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (($Files!='.')&amp;&amp;($Files!='..')) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (file_exists($gallery_path.&quot;/&quot;.$del_dir.&quot;/thumbs/&quot;.$Files)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  unlink($gallery_path.&quot;/&quot;.$del_dir.&quot;/thumbs/&quot;.$Files);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (file_exists($gallery_path.&quot;/&quot;.$del_dir.&quot;/pix/&quot;.$Files)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  unlink($gallery_path.&quot;/&quot;.$del_dir.&quot;/pix/&quot;.$Files);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $tmp=rmdir($gallery_path.&quot;/&quot;.$del_dir.&quot;/pix&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $tmp=rmdir($gallery_path.&quot;/&quot;.$del_dir.&quot;/thumbs&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (file_exists($gallery_path.&quot;/&quot;.$del_dir.&quot;/settings.dat&quot;)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  unlink($gallery_path.&quot;/&quot;.$del_dir.&quot;/settings.dat&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $tmp=rmdir($gallery_path.&quot;/&quot;.$del_dir);<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
//<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $dirs_count=0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $category_settings='';<br />
&nbsp; &nbsp; &nbsp; &nbsp; $Open=opendir($gallery_path);<br />
&nbsp; &nbsp; &nbsp; &nbsp; while ($Files=readdir($Open)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!is_file($Files)&amp;&amp;$Files!='.'&amp;&amp;$Files!='..') {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&lt;table width=&quot;239&quot;&gt;&lt;tr&gt;&lt;td style=&quot;color:#ffffff&quot;&gt;';<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;&lt;a href=\&quot;admin.php?del_dir=$Files\&quot; class=\&quot;menu_2\&quot;&gt;&lt;img src=\&quot;pics/delete.gif\&quot; border=0 alt=\&quot;delete\&quot;&gt;&lt;/a&gt; &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;&lt;a href=\&quot;admin.php?edit_dir=$Files\&quot; class=\&quot;menu_2\&quot;&gt;&lt;img src=\&quot;pics/edit.gif\&quot; border=0 alt=\&quot;edit\&quot;&gt;&lt;/a&gt; &quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($dir_selected==$dirs_count) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $selectDir=$Files;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;&lt;a href=\&quot;admin.php?dir_selected=$dirs_count\&quot; class=\&quot;menu_1\&quot;&gt;$Files&lt;/a&gt;&quot;;<br />
<br />
//read category settings<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $FileName=&quot;$gallery_path/$Files/settings.dat&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (is_file($FileName)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $File=fopen($FileName,'r');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (filesize($FileName)&gt;0) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $category_settings=fread($File,filesize($FileName));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fclose($File);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;&lt;a href=\&quot;admin.php?dir_selected=$dirs_count\&quot; class=\&quot;menu_2\&quot;&gt;$Files&lt;/a&gt;&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $dirs_count++;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; print '&lt;br&gt;&lt;br&gt;&lt;table width=&quot;100%&quot;&gt;&lt;tr&gt;&lt;td&nbsp; style=&quot;color:#FFFFFF &quot;&gt;&lt;strong class=&quot;white&quot;&nbsp; style=&quot; font-size:11px &quot;&gt;Add new category:&lt;/strong&gt;&lt;form action=&quot;admin.php&quot; method=&quot;post&quot;&gt;&lt;input name=&quot;dir_selected&quot; type=&quot;hidden&quot; value=&quot;'.$dir_selected.'&quot;&gt;&lt;input type=&quot;text&quot; name=&quot;new_dir&quot; style=&quot;border-color:#777777; border-width:1px; border-style:solid; background-color:#000000; color:#777777 &quot;&gt;&lt;input name=&quot;OK&quot; type=&quot;submit&quot; value=&quot;&quot;&nbsp; style=&quot;width:51px; height:21px; border-width:0px; border-style:solid; background-image:url(pics/add.jpg)&quot;&gt;&lt;/form&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; print &quot;&lt;/td&gt;&lt;td&gt;&quot;;<br />
<br />
//select image - save category settings<br />
&nbsp; &nbsp; &nbsp; &nbsp; $select_file=$_GET['select_file'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (($select_file!='')&amp;&amp;($dirs_count!=0)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $FileName=&quot;$gallery_path/$selectDir/settings.dat&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $File=fopen($FileName,'w');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fwrite($File,$select_file);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fclose($File);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $category_settings=$select_file;<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
// add new picture<br />
<br />
if (isset($_FILES[&quot;new_file&quot;])) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (is_uploaded_file($_FILES['new_file']['tmp_name'])) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $filename = $_FILES['new_file']['tmp_name'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $upload_name = $_FILES['new_file']['name'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ext = substr($_FILES['new_file']['name'], <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 + strrpos($_FILES['new_file']['name'], &quot;.&quot;));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $size = GetImageSize($filename);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (($size)&amp;&amp;($size[0]&lt;$pic_max_size_x)&amp;&amp;($size[1]&lt;$pic_max_size_y)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (copy($filename, $gallery_path.&quot;/&quot;.$selectDir.&quot;/pix/&quot;.$upload_name)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; require ('inc/imgresize.php');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; img_resize($filename, $gallery_path.&quot;/&quot;.$selectDir.&quot;/thumbs/&quot;.$upload_name, $thumb_size_x, $thumb_size_y);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unlink($filename);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;&lt;center&gt;&lt;strong class=\&quot;white\&quot;&nbsp; style=\&quot; font-size:11px \&quot;&gt;Size of new picture is very large. Please resize this.&lt;br /&gt;&lt;br /&gt;&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;Maximum size of new picture must be: &quot;.$pic_max_size_x.&quot;x&quot;.$pic_max_size_y.&quot;&lt;/center&gt;&lt;br /&gt;&lt;br /&gt;&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
};<br />
<br />
// delete picture<br />
&nbsp; &nbsp; &nbsp; &nbsp; $delete_file=$_GET['delete_file'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ($delete_file) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  unlink($gallery_path.&quot;/&quot;.$selectDir.&quot;/thumbs/&quot;.$delete_file);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  unlink($gallery_path.&quot;/&quot;.$selectDir.&quot;/pix/&quot;.$delete_file);<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
//<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&lt;br&gt;&lt;br&gt;&lt;table width=&quot;100%&quot;&nbsp; style=&quot;margin-left:15px; margin-top:0px;&quot;&gt;&lt;tr&gt;&lt;td colspan=&quot;3&quot;&gt;&lt;strong class=&quot;white&quot;&nbsp; style=&quot; font-size:11px &quot;&gt;Add new picture:&lt;/strong&gt;&lt;form enctype=&quot;multipart/form-data&quot; action=&quot;admin.php&quot; method=&quot;post&quot;&gt;&lt;input name=&quot;dir_selected&quot; type=&quot;hidden&quot; value=&quot;'.$dir_selected.'&quot;&gt;&lt;input type=&quot;file&quot; name=&quot;new_file&quot; style=&quot;border-color:#777777; border-width:1px; border-style:solid; background-color:#000000; color:#777777 &quot;&gt;&amp;nbsp;&lt;input name=&quot;OK&quot; type=&quot;submit&quot; value=&quot;&quot;&nbsp; style=&quot;width:51px; height:21px; border-width:0px; border-style:solid; background-image:url(pics/add.jpg)&quot;&gt;&lt;/form&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; if ($dirs_count&gt;0) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $k=0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $Open=opendir($gallery_path.&quot;/&quot;.$selectDir.&quot;/thumbs&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($Open) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; while ($Files=readdir($Open)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $out = array();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; preg_match('/\S+\.(\S+)$/', $Files, $out);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($out[1]===&quot;jpg&quot;) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&lt;table width=&quot;100%&quot;&nbsp; bgcolor=&quot;#161616&quot; cellspacing=&quot;1&quot; cellpadding=&quot;5&quot; style=&quot;margin-left:15px; margin-top:0px;&quot;&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($k==0) {&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&lt;tr bgcolor=&quot;#313131&quot;&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $k++;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&lt;tr bgcolor=&quot;#2d2d2d&quot;&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $k=0;&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&lt;td width=&quot;38&quot;&gt;&lt;a href=&quot;admin.php?';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;delete_file=$Files&amp;dir_selected=$dir_selected&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&quot;&gt;&lt;img src=&quot;pics/delete.gif&quot; border=0 alt=&quot;delete&quot; style=&quot;margin-left:12px &quot;&gt;&lt;/td&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&lt;td width=&quot;38&quot;&gt;&lt;a href=&quot;admin.php?';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($category_settings!=$Files) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;select_file=$Files&amp;dir_selected=$dir_selected&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&quot;&gt;&lt;img src=&quot;pics/no_select.gif&quot; border=0 alt=&quot;select&quot; style=&quot;margin-left:12px &quot;&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print &quot;select_file=$Files&amp;dir_selected=$dir_selected&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&quot;&gt;&lt;img src=&quot;pics/select.gif&quot; border=0 alt=&quot;select&quot; style=&quot;margin-left:12px &quot;&gt;&lt;/td&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&lt;td width=&quot;50&quot;&gt;&lt;a href=&quot;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print $gallery_path.&quot;/&quot;.$selectDir.&quot;/pix/&quot;.$Files;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&quot;&gt;&lt;img src=&quot;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print $gallery_path.&quot;/&quot;.$selectDir.&quot;/thumbs/&quot;.$Files;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&quot; border=&quot;0&quot; width=&quot;50&quot; height=&quot;50&quot;&gt;&lt;/a&gt;&lt;/td&gt;&lt;td&nbsp; style=&quot;color:#FFFFFF &quot;&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print $Files;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&lt;table width=&quot;100%&quot;&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&lt;tr&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&lt;td colspan=&quot;3&quot;&gt;no files found&lt;/td&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print '&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; };<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; include(&quot;inc/bottom.php&quot;);<br />
};<br />
};<br />
<br />
?&gt;</pre><br />
config.php<br />
<br />
 <pre style="margin:20px; line-height:13px">&lt;?<br />
$admin_login=&quot;admin&quot;;<br />
$admin_pass=&quot;pass&quot;;<br />
$gallery_path=&quot;gallery&quot;;<br />
$pic_max_size_x=&quot;547&quot;;<br />
$pic_max_size_y=&quot;391&quot;;<br />
$thumb_size_x=&quot;104&quot;;<br />
$thumb_size_y=&quot;80&quot;;<br />
?&gt;</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum17.html">PHP</category>
			<dc:creator>freshfitz</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread242298.html</guid>
		</item>
		<item>
			<title>flash calendar</title>
			<link>http://www.daniweb.com/forums/thread231236.html</link>
			<pubDate>Sun, 18 Oct 2009 19:46:55 GMT</pubDate>
			<description>My customer wants me to integrate a flash calendar into their website is there any premade code that has a send to friends link that would send the data on that day to outlook so you can email it? I found calendarpro by www.usflashmap.com (http://www.usflashmap.com) which is working but they would...</description>
			<content:encoded><![CDATA[<div>My customer wants me to integrate a flash calendar into their website is there any premade code that has a send to friends link that would send the data on that day to outlook so you can email it? I found calendarpro by <a rel="nofollow" class="t" href="http://www.usflashmap.com" target="_blank">www.usflashmap.com</a> which is working but they would like the email feature and a twitter facebook plugin if possible.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum143.html">HTML and CSS</category>
			<dc:creator>freshfitz</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231236.html</guid>
		</item>
	</channel>
</rss>
