mirror of
				https://github.com/fspc/Yellow-Bike-Database.git
				synced 2025-11-03 17:05:35 -05:00 
			
		
		
		
	This closes #83 adding probation status to shop_log for contact_id.
This commit is contained in:
		
							parent
							
								
									23ce8ffaca
								
							
						
					
					
						commit
						ca4085109c
					
				@ -120,6 +120,16 @@ BANNED IDS
 | 
				
			|||||||
// Ban those pesky individuals who continually refuse to follow policies and safer space agreements by contact_id
 | 
					// Ban those pesky individuals who continually refuse to follow policies and safer space agreements by contact_id
 | 
				
			||||||
$banned_individuals = array();
 | 
					$banned_individuals = array();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/************
 | 
				
			||||||
 | 
					PROBATION IDS
 | 
				
			||||||
 | 
					************/				
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Put individuals under probation by contact_id. Probation could be used for a variety of scenarios, 
 | 
				
			||||||
 | 
					// an individual who may potentially become banned, or who has been deemed as worthy of coming out of a ban,
 | 
				
			||||||
 | 
					// or someone who IOU's volunteer time for a bike they earned (generally, people should not be allowed to do
 | 
				
			||||||
 | 
					// this in the first place), etc.
 | 
				
			||||||
 | 
					$probation_individuals = array();
 | 
				
			||||||
 | 
										
 | 
				
			||||||
/*******
 | 
					/*******
 | 
				
			||||||
CONTACTS
 | 
					CONTACTS
 | 
				
			||||||
********/
 | 
					********/
 | 
				
			||||||
@ -369,7 +379,7 @@ function generate_list($querySQL,$list_value,$list_text, $form_name, $default_va
 | 
				
			|||||||
			$default_delimiter = 'selected="selected"';
 | 
								$default_delimiter = 'selected="selected"';
 | 
				
			||||||
		} else { $default_delimiter = '';}
 | 
							} else { $default_delimiter = '';}
 | 
				
			||||||
		echo '<option style="color:' . $color . ';" value="' . $row_recordset[$list_value] . '" ' . $default_delimiter . '>' .
 | 
							echo '<option style="color:' . $color . ';" value="' . $row_recordset[$list_value] . '" ' . $default_delimiter . '>' .
 | 
				
			||||||
				$row_recordset[$list_text] . '</option>\n';		
 | 
									$row_recordset[$list_text] . '</option>';		
 | 
				
			||||||
		} while ($row_recordset = mysql_fetch_assoc($recordset));
 | 
							} while ($row_recordset = mysql_fetch_assoc($recordset));
 | 
				
			||||||
 	$rows = mysql_num_rows($recordset);
 | 
					 	$rows = mysql_num_rows($recordset);
 | 
				
			||||||
 	if($rows > 0) {
 | 
					 	if($rows > 0) {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										18
									
								
								js/shop.js
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								js/shop.js
									
									
									
									
									
								
							@ -33,6 +33,23 @@ $(function(){
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	$(banned_list).css({backgroundColor: "red"}).prop("title", "BANNED");
 | 
						$(banned_list).css({backgroundColor: "red"}).prop("title", "BANNED");
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
 | 
						// return probation list
 | 
				
			||||||
 | 
						var probation_list, pl;
 | 
				
			||||||
 | 
						$.post("json/contact.php", {probation: 1}, function (data) { 
 | 
				
			||||||
 | 
							if (data) {
 | 
				
			||||||
 | 
								pl = $.parseJSON(data);
 | 
				
			||||||
 | 
								$(pl).each(function(i,v) { 
 | 
				
			||||||
 | 
									if (i === 0) {		
 | 
				
			||||||
 | 
										probation_list = "#" + v;
 | 
				
			||||||
 | 
									} else { 
 | 
				
			||||||
 | 
										probation_list = probation_list + ",#" + v; 
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						$(probation_list).css({backgroundColor: "#eed202"}).prop("title", "PROBATION");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// error handler for shops	with a popup dialog (TODO)	
 | 
						// error handler for shops	with a popup dialog (TODO)	
 | 
				
			||||||
	function error_handler(input,error_span,error,error_text,event) {		
 | 
						function error_handler(input,error_span,error,error_text,event) {		
 | 
				
			||||||
		var trans_error = 0;
 | 
							var trans_error = 0;
 | 
				
			||||||
@ -87,7 +104,6 @@ $(function(){
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	} );
 | 
						} );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
	// could have done this in php, but this separates out the view logic   
 | 
						// could have done this in php, but this separates out the view logic   
 | 
				
			||||||
	var membership_ids, volunteer_ids;
 | 
						var membership_ids, volunteer_ids;
 | 
				
			||||||
	var last_index = $("#shop_log tr[id]").length;
 | 
						var last_index = $("#shop_log tr[id]").length;
 | 
				
			||||||
 | 
				
			|||||||
@ -57,6 +57,15 @@ $ssl_certificate = SSL_CERTIFICATE;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	}	
 | 
						}	
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
 | 
						// pass probation contact_id values if they exist
 | 
				
			||||||
 | 
						if (isset($_POST['probation'])) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if ($probation_individuals) {
 | 
				
			||||||
 | 
								echo json_encode($probation_individuals);		
 | 
				
			||||||
 | 
							}		
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						}		
 | 
				
			||||||
 | 
						
 | 
				
			||||||
	// update email_list
 | 
						// update email_list
 | 
				
			||||||
	if( isset($_POST['email_list']) ) {		
 | 
						if( isset($_POST['email_list']) ) {		
 | 
				
			||||||
					
 | 
										
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user