This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | mysql_query("Update awards set `active` = if(`active`=0,1,0) where `id`={$_GET['id']}"); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function GetSingularValuesArray($arr) | |
| { | |
| $result=array(); | |
| foreach($arr as $key=>$value): | |
| $temp=key($value); | |
| $result[]=is_object($value)?$value->$temp:$value[$temp]; | |
| endforeach; | |
| return $result; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | function array_to_select($results, $value = 'id', $key = 'title', $add_blank=false) | |
| { | |
| // Converts objects to arrays | |
| if(is_object($results)) $results = get_object_vars($results); | |
| $options = array(); | |
| if(!empty($add_blank)) $options = array(null=>$add_blank); | |
| // Will only run if results is an array, not a string, int, etc. | 
NewerOlder