From: Alan J. Pippin <ajp@pippins.net>
Date: Wed, 8 Sep 2010 20:30:47 +0000 (-0600)
Subject: Added extra messages for failed file upload.
X-Git-Tag: release_0_4_0~7
X-Git-Url: http://git.pippins.net/%27%20%20%20%20.%20%24GLOBALS%5B%27phpgw%27%5D-%3Elink%28%27inc/jquery/static/images/%3C?a=commitdiff_plain;h=8b4dd6f242ee77016450d54c8272bd88dfd15c52;p=eq%2F.git

Added extra messages for failed file upload.
Added EQ presidency members to interviewer drop down list in PPI scheduling tool.
---

diff --git a/inc/class.eq.inc.php b/inc/class.eq.inc.php
index 9b59778..1038cf0 100644
--- a/inc/class.eq.inc.php
+++ b/inc/class.eq.inc.php
@@ -2554,15 +2554,22 @@ class eq
       $date = get_var('date',array('GET','POST'));
       $notes = get_var('notes',array('GET','POST'));
       $eqpresppi = get_var('eqpresppi',array('GET','POST'));
-      
-      $sql = "SELECT * FROM eq_elder WHERE elder=" . $interviewer;
+     
+      $sql = "SELECT * FROM eq_presidency where valid=1 and eqpres=0";
       $this->db2->query($sql,__LINE__,__FILE__);
-      $this->db2->next_record();
-      $interviewer_name = $this->db2->f('name');
-      $this->t->set_var('interviewer',$interviewer . ' selected');
-      $this->t->set_var('interviewer_name',$interviewer_name);
-      $this->t->set_var('eqpresppi_checked','');
-      $this->t->fp('int_list','interviewer_list',True);
+      while ($this->db2->next_record())
+      {
+        $elder = $this->db2->f('elder');
+	$interviewer_name = $this->db2->f('name');
+        if($elder == $interviewer) { 
+          $this->t->set_var('interviewer',$interviewer . ' selected');
+        } else {
+	  $this->t->set_var('interviewer',$interviewer);
+	}
+        $this->t->set_var('interviewer_name',$interviewer_name);
+        $this->t->set_var('eqpresppi_checked','');
+        $this->t->fp('int_list','interviewer_list',True);
+      }
     
       if($action == 'save')
 	{
@@ -4050,6 +4057,12 @@ class eq
 	    if(!move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
 	      $uploadstatus = "<b><font color=red> -E- Unable to move the uploaded file to ";
 	      $uploadstatus.= "the target path (check the path and permissions) of: $target_path</font></b>";
+	      $uploadstatus = "<b>The following file was uploaded successfully: </b><br><br>";
+	      $uploadstatus.= "Tmp Filename : " . $_FILES['uploadedfile']['tmp_name'] . "<br>";
+	      $uploadstatus.= "Filename     : " . $_FILES['uploadedfile']['name'] . "<br>";
+	      $uploadstatus.= "Type         : " . $_FILES['uploadedfile']['type'] . "<br>";
+	      $uploadstatus.= "Size         : " . $_FILES['uploadedfile']['size'] . "<br>";
+	      $uploadstatus.= "Error        : " . $_FILES['uploadedfile']['error'] . "<br>";	 
 	      $this->t->set_var('uploadstatus',$uploadstatus);
 	      $this->t->pfp('uploadhandle','upload',True);
 	      return 0;