Index: npl/syn3/webportal/src/index.php
===================================================================
--- npl/syn3/webportal/src/index.php	(revision 9c8fcb1cb109725a87c3057b1d92d9432701974c)
+++ npl/syn3/webportal/src/index.php	(revision 34365fb29a0ae0827378aa3aee95277ea21bd794)
@@ -1,6 +1,6 @@
 <?
-/** Syn-3 dynamic web portal 
+/** Syn-3 dynamic web portal
  *
- * (C) 2007 DatuX / Syn-3
+ * (C) 2007-2018 DatuX / Syn-3
  */
 ?>
@@ -22,4 +22,5 @@
 </div>
 
+
 <div id='content' style='padding-top:25'>
 
@@ -39,15 +40,15 @@
 						continue;
 
-					
+
 					echo "<tr >";
-					
+
 					//logo met link, iedere webapp heeft een webportal.png.
-					echo "<td style='vertical-align:middle'>";
-					echo "<br>";
+					echo "<td style='vertical-align: middle; text-align: center; background:white'>";
 					echo "<a href='$webapp'>";
 					echo "<image src='$img'>";
-					
+
 					//omschrijving, staat voor iedere webapp in webportal.desc
-					echo "<td style='font-size: 150%;vertical-align:middle'>";
+					echo "<td style='vertical-align:middle'>";
+					echo "<a href='$webapp' style='font-size: 150%;'>";
 					$desc=file_get_contents("$webapp/webportal.desc");
 					if ($desc)
@@ -55,12 +56,12 @@
 					else
 						echo $webapp;
-					
-					//syn3 pijl met link
-					echo "<td style='vertical-align:middle'>";
-					echo "<a href='$webapp'>";
-					echo "<image src='img/stat.png'>";
-					echo "</a>";
-					
-					
+
+					// //syn3 pijl met link
+					// echo "<td style='vertical-align:middle'>";
+					// echo "<a href='$webapp'>";
+					// echo "<image src='img/stat.png'>";
+					// echo "</a>";
+
+
 					echo "</tr>";
 				}
@@ -74,5 +75,5 @@
 		echo "Klik <a href='https://$_SERVER[HTTP_HOST]$_SERVER[SCRIPT_URL]'>hier</a> voor een veilige verbinding.";
 	}
-	
+
 ?>
 	</TD></TR>
Index: npl/syn3/webportal/upload.sh
===================================================================
--- npl/syn3/webportal/upload.sh	(revision 9c8fcb1cb109725a87c3057b1d92d9432701974c)
+++ npl/syn3/webportal/upload.sh	(revision 34365fb29a0ae0827378aa3aee95277ea21bd794)
@@ -1,13 +1,15 @@
 [ ! "$1" ] && exit 1
 cd src || exit 1
-sshkeyfix $1 || exit 1
+#sshkeyfix $1 || exit 1
 while true; do 
-    MD5=`ls -lcRi --time-style=+%s | md5sum`
+    MD5=`ls -lcRi --time-style=+%s ../userportal .| md5sum`
     if [ "$MD5" != "$UPLOADEDMD5" ]; then
          cd ..
 #        php updatelang.php
          cd src
-         if rsync --exclude '.*' --delete -e ssh -v -a . $1:/var/www/htdocs/syn3/webportal ;then
+         if rsync --exclude '.*' --delete -e ssh -v -a . $1:/var/www/htdocs/syn3/webportal && 
+          rsync --exclude '.*' --delete -e ssh -v -a ../userportal/ $1:/var/www/htdocs/syn3/userportal ;then
          #rsync -e ssh -v -a ../../syn3-scripts/scripts/ $1:/sbin ;
+         	ssh $1 "killall httpd"
          	UPLOADEDMD5="$MD5"
 	 fi
Index: npl/syn3/webportal/userportal/index.php
===================================================================
--- npl/syn3/webportal/userportal/index.php	(revision 9c8fcb1cb109725a87c3057b1d92d9432701974c)
+++ npl/syn3/webportal/userportal/index.php	(revision 34365fb29a0ae0827378aa3aee95277ea21bd794)
@@ -1,4 +1,8 @@
-<h1>Nieuw wachtwoord instellen</h1>
-
+<?
+/** Syn-3 dynamic web portal
+ *
+ * (C) 2007-2018 DatuX / Syn-3
+ */
+?>
 <?
 include "ldap.php";
@@ -10,12 +14,20 @@
 	else
 		$error=user_resetpassword($_REQUEST['username'], $_REQUEST['old'], $_REQUEST['new1']);
-		
+
 	if ($error)
-		echo "<div style='color:red'>$error</div>";
+		$error="<div style='color:red'>$error</div>";
 	else
 	{
-		echo "<div style='color:green'>Ok, uw wachtwoord is gewijzigd</div>";
-		echo "Klik <a href='/syn3/zarafa'>hier</a> om in te loggen op uw webmail";
-		exit;	
+		// unset cookies, especially zarafa is acting weird if the password is changed.
+		if (isset($_SERVER['HTTP_COOKIE'])) {
+			$cookies = explode(';', $_SERVER['HTTP_COOKIE']);
+			foreach($cookies as $cookie) {
+				$parts = explode('=', $cookie);
+				$name = trim($parts[0]);
+				setcookie($name, '', time()-1000);
+				setcookie($name, '', time()-1000, '/');
+			}
+		}
+		$ok=1;
 	}
 }
@@ -25,23 +37,58 @@
 
 
+<html>
+	<head>
+	<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=utf-8">
+	<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+	<META HTTP-EQUIV="Expires" CONTENT="-1">
+	<link REL="SHORTCUT ICON" HREF="<? echo "http://$_SERVER[HTTP_HOST]/syn3/webportal/img/favicon.ico"; ?>">
+	<link href="../webportal/main.css?ver=4.1" type="text/css" rel="stylesheet">
+	<title><?System("hostname -f");?> - Wachtwoord wijzigen</title>
+	</head>
+	<body>
 
-<form action='index.php' method='post'>
-    Usernaam: <input type='text' name='username' value='<?=$_REQUEST['username']?>'>
-    
-    <p>
-    
-    Oud password: <input type='password' name='old'  value='<?=$_REQUEST['old']?>'>
+		<div id='logo'>
+			<a href='http://www.syn-3.eu'>
+			<img src='../webportal/img/Banner_SYN3_Portal.png'>
+			</a>
+		</div>
 
-    <p>
+		<div id='content' style='padding-top:10em; text-align:center' >
 
-    Nieuw password: <input type='password' name='new1'  value=''>
+			<h1>Nieuw wachtwoord instellen</h1>
 
-    <p>
+			<?=$error ?>
 
-    Nieuw password (nogmaals): <input type='password' name='new2'  value=''>
-    
-	
-    <p>
-        
-    <input type='submit' value='Opslaan'>
-</form>
+			<? if ($ok) { ?>
+
+				<div style='color:green'>Ok, uw wachtwoord is gewijzigd</div>
+				<p>Klik <a href='/'>hier</a> om verder te gaan.
+
+			<? } else { ?>
+		
+				<form  action='index.php' method='post' style='display: inline-block'>
+					<table>
+						<tr>
+							<td>Usernaam:
+							<td><input autofocus type='text' name='username' value='<?=$_REQUEST['username']?>'>
+						<tr>
+							<td>Oud password:
+							<td><input type='password' name='old'  value='<?=$_REQUEST['old']?>'>
+						<tr>
+							<td>Nieuw password:
+							<td><input type='password' name='new1'  value=''>
+						<tr>
+							<td>Nieuw password (nogmaals):
+							<td><input type='password' name='new2'  value=''>
+					</table>
+
+
+				    <p>
+
+				    <input type='submit' value='Opslaan'>
+				</form>
+			<? } ?>
+
+		</div>
+	</body>
+</html>
Index: npl/syn3/webportal/userportal/ldap.php
===================================================================
--- npl/syn3/webportal/userportal/ldap.php	(revision 9c8fcb1cb109725a87c3057b1d92d9432701974c)
+++ npl/syn3/webportal/userportal/ldap.php	(revision 34365fb29a0ae0827378aa3aee95277ea21bd794)
@@ -1,4 +1,4 @@
 <?
-/* 
+/*
 (C) 2004-2013 DatuX - info@datux.nl
 
@@ -23,8 +23,8 @@
 	if (!$ldap_conn)
 		return (ldap_error($ldap_conn));
-		
+
 	if (strlen($new)<5)
 		return ("Nieuw wachtwoord mag niet korter zijn dan 5 tekens.");
-		
+
 	ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3);
 
@@ -32,19 +32,19 @@
 
 	$user_entries=ldap_get_entries($ldap_conn, $result);
-	
+
 //	echo "<pre>";print_r($user_entries);
 
 
-	if ($user_entries['count']!=1)
-		return ("U heeft een ongeldige gebruikersnaam ingegeven");
-	
+	// if ($user_entries['count']!=1)
+	// 	return ("U heeft een ongeldige gebruikersnaam ingegeven");
+
 	$dn=$user_entries[0]['dn'];
-    
+
 	if (!ldap_bind($ldap_conn, $dn, $old))
 	{
 		return ("U heeft uw oude wachtwoord niet goed ingegeven: ".ldap_error($ldap_conn));
 	}
-	
-	
+
+
 	if (!ldap_mod_replace($ldap_conn, $dn, array(
 		"userPassword" => "{SHA}".base64_encode(pack("H*", sha1( $new )))
@@ -53,6 +53,6 @@
 		return ("Password wijzigen is mislukt: ".ldap_error($ldap_conn));
 	}
-	
-	
+
+
 }
 
Index: npl/syn3/webportal/userportal/webportal.desc
===================================================================
--- npl/syn3/webportal/userportal/webportal.desc	(revision 34365fb29a0ae0827378aa3aee95277ea21bd794)
+++ npl/syn3/webportal/userportal/webportal.desc	(revision 34365fb29a0ae0827378aa3aee95277ea21bd794)
@@ -0,0 +1,1 @@
+Wachtwoord wijzigen
Index: npl/syn3/webportal/webportal.SlackBuild
===================================================================
--- npl/syn3/webportal/webportal.SlackBuild	(revision 9c8fcb1cb109725a87c3057b1d92d9432701974c)
+++ npl/syn3/webportal/webportal.SlackBuild	(revision 34365fb29a0ae0827378aa3aee95277ea21bd794)
@@ -5,5 +5,5 @@
 ##################################### Build dependency info:
 
-#Strict build-dependencies. 
+#Strict build-dependencies.
 #Only use when really neccesary, this will rebuild our package if the dependencie has changed:
 ##DEP:linux
@@ -28,7 +28,10 @@
 ARCH=noarch
 
-#trap files erin
+#files erin
 mkdir -p /tmp/pkg/var/www/htdocs/syn3/webportal || exit 1
 cp -a src/* /tmp/pkg/var/www/htdocs/syn3/webportal || exit 1
+
+mkdir -p /tmp/pkg/var/www/htdocs/syn3/userportal || exit 1
+cp -a userportal/* /tmp/pkg/var/www/htdocs/syn3/userportal || exit 1
 
 mkdir -p /tmp/pkg/etc/postinst.d || exit 1
@@ -42,4 +45,2 @@
 #make main package
 syn3_makepkg /tmp/pkg $NAME $VER $ARCH || exit 1
-
-
Index: npl/syn3/webportal/webportal.build
===================================================================
--- npl/syn3/webportal/webportal.build	(revision 9c8fcb1cb109725a87c3057b1d92d9432701974c)
+++ npl/syn3/webportal/webportal.build	(revision 34365fb29a0ae0827378aa3aee95277ea21bd794)
@@ -1,1 +1,1 @@
-5124
+5126
Index: npl/syn3/webportal/webportal.md5
===================================================================
--- npl/syn3/webportal/webportal.md5	(revision 9c8fcb1cb109725a87c3057b1d92d9432701974c)
+++ npl/syn3/webportal/webportal.md5	(revision 34365fb29a0ae0827378aa3aee95277ea21bd794)
@@ -8,8 +8,12 @@
 c9a88e87ef4b242a41c3909c1599cc5a  ./src/img/tr-bg.gif
 da822aee1a92e293e231bba79c7fea6e  ./src/img/user_bg.gif
-f4a0b3d4d568f9a6e7a2f70511f91c9d  ./src/index.php
+2edf9c890e4d3febe7533399d6084a4d  ./src/index.php
 bc451aed5c27aafe8c98d17b56235d58  ./src/main.css
-0dab2532142ee8a60fd2b91cd526da09  ./upload.sh
-643bdb7030b919c48676045d1b8f0d4b  ./webportal.SlackBuild
-cdffc5ce8a276bef238e7831ebf39316  ./webportal.SlackBuild.log.gz
-c8639b4c582528a04a2777bbc2ec90aa  ./webportal.pkg
+bf09fa371345d2aa30d7aa87be834473  ./upload.sh
+7f45f0bb430ee5d7071c5791e6c032a4  ./userportal/index.php
+3377cb00324d0117c6d0ca69717ac2f1  ./userportal/ldap.php
+92cf074cee59c2a1e41fdf9ebdcd64b0  ./userportal/webportal.desc
+b89ad74b3201219efbf12a49c9774d7d  ./userportal/webportal.png
+481f7ea97bba6cf95d18d275b955b1ab  ./webportal.pkg
+dbc09d3ef3c391c169787fa2b445e470  ./webportal.SlackBuild
+b08ece7c6ad33d69e99a083a34ee75f9  ./webportal.SlackBuild.log.gz
