Example #1
0
	);
	
	$insert = DB::exec($sql, $data);
	$msg = 'ºÑ¹·Ö¡¢éÍÁÙÅàÃÕºÃéÍÂ';
	if( $insert['error'] ){
		$msg = 'äÁèÊÒÁÒöºÑ¹·Ö¡¢éÍÁÙÅä´é ¡ÃسҵԴµèÍâ»Ãá¡ÃÁàÁÍÃì';
	}
	
	redirect('ward_stat.php?page=home_acu', $msg);
	exit;
} elseif ( $action === 'acu_edit' ) {
	
	$default_acu = getAcuList();
	$default_porjai = getPorjaiList();
	
	$post = filter_post($_POST, '');
	$officer = get_session('sOfficer');
	$date_write = $post['date_year'].'-'.$post['date_month'];
	
	// Clean data
	$pre_patient_num = array();
	foreach($default_acu as $key => $item){
		$pre_patient_num[$key] = (!empty($post[$key])) ? $post[$key] : $item ;
	}
	$patient_num = serialize($pre_patient_num);
	
	$pre_porjai = array();
	foreach($default_porjai as $key => $item){
		$pre_porjai[$key] = (!empty($post[$key])) ? $post[$key] : $item ;
	}
	$porjai = serialize($pre_porjai);
Example #2
0
function taiga_edit_issue_attributes($auth, $id)
{
    if ($attributes = taiga_get_issue_attributes($auth, $id)) {
        $version = $attributes['version'];
        $process = curl_init(TAIGA_HOST . "issues/custom-attributes-values/{$id}");
        curl_setopt($process, CURLOPT_HTTPHEADER, array('Content-Type: application/json; charset=utf-8', "Authorization: Bearer {$auth}"));
        curl_setopt($process, CURLOPT_CUSTOMREQUEST, "PATCH");
        // Id's collected using https://api.taiga.io/api/v1/issue-custom-attributes?project=121115
        curl_setopt($process, CURLOPT_POSTFIELDS, json_encode(array('attributes_values' => array('1671' => filter_post('name'), '1672' => filter_post('email')), 'version' => $version, 'issue' => $id)));
        curl_setopt($process, CURLOPT_RETURNTRANSFER, true);
        if ($attributes = curl_exec($process)) {
            $attributes = json_decode($attributes, true);
        }
        curl_close($process);
    }
    return $attributes;
}