Query($del_sql); header("Location: alluserdata.php?user_id=".$user_id); exit(); } $mapper = new CInfoMapper( 'data_dictionary', 'info_display_label', 'info_name', 'is_required', 'Y' ); $ui_nut = new CDBNut(DB_LOGIN_NAME.'.user_info', $user_id, 'user_id'); $addr_nuts = new CDBMultiNut(DB_LOGIN_NAME.'.user_info_address',$user_id,'user_id','tabs'); $ext_nut = new CDBNut(DB_LOGIN_NAME.'.user_info_ext', $user_id, 'user_id'); $attr_nut = new CDBNut(DB_LOGIN_NAME.'.user_attributes', $user_id, 'user_id'); $_SESSION['ui'] = $ui_nut -> GetAllData(); $_SESSION['ext'] = $ext_nut -> GetAllData(); $_SESSION['addr']= $addr_nuts -> GetAllData(); $ui_nut->Hide('user_id'); $ext_nut->Hide('user_id'); $addr_nuts->Hide('user_id'); /* **** 7/5/07 Rich Kudela - Hiding info based on User Logged in per UBDs request*/ //First, if this is the user logged in and its not an admin, hide some stuff if($clsLogin->GetUserId() == $_GET['user_id'] && !$clsLogin->IsUserTypeLoggedIn('COMS Administrator')){ /*$attributes_nut -> Hide('user_id'); $attributes_nut -> Hide('International_DDS_Program'); $attributes_nut -> Hide('UB_Staff'); $attributes_nut -> Hide('UB_Faculty'); $attributes_nut -> Hide('UB_PT_Faculty'); $attributes_nut -> Hide('Post_Grad_Resident'); $attributes_nut -> Hide('Retired'); $attributes_nut -> Hide('Speaker'); $attributes_nut -> Hide('Clinics_Groups'); $attributes_nut -> Hide('ACDE'); $attributes_nut -> Hide('Reviewed'); $attributes_nut -> Hide('Exhibitor'); $attributes_nut -> Hide('Company_Rep'); $attributes_nut -> Hide('Vendor'); $attributes_nut -> Hide('Advertiser'); */ $ui_nut -> Hide('priority'); $ui_nut -> Hide('allow_mail'); $ui_nut -> Hide('allow_email'); $ui_nut -> Hide('allow_display'); $ui_nut -> Hide('preferred'); $ext_nut -> Hide('demo_agd_number'); $ext_nut -> Hide('demo_spouse'); $ext_nut -> Hide('demo_former_name'); $ext_nut -> Hide('demo_ada_num'); $ext_nut -> Hide('demo_dental_school'); $ext_nut -> Hide('demo_year_graduated'); $ext_nut -> Hide('demo_specialty'); $ext_nut -> Hide('demo_ss_num'); $ext_nut -> Hide('demo_student_num'); $ext_nut -> Hide('demo_person_num'); $ext_nut -> Hide('demo_pager_num'); $ext_nut -> Hide('demo_website'); $ext_nut -> Hide('demo_date_death'); $ext_nut -> Hide('date_death'); $ext_nut -> Hide('demo_date_birth'); $ext_nut -> Hide('date_birth'); $ext_nut -> Hide('demo_gender'); $ext_nut -> Hide('demo_county'); $ext_nut -> Hide('list_alumni_codes'); $ext_nut -> Hide('list_cde_codes'); $ext_nut -> Hide('list_ub_grad_progs'); $ext_nut -> Hide('notes_general'); $ext_nut -> Hide('notes_resume'); $ext_nut -> Hide('notes_additional'); $ext_nut -> Hide('photo'); $ext_nut -> Hide('ub_dds_degree'); $ext_nut -> Hide('ub_post_grad_degree'); $ext_nut -> Hide('specialty'); $ext_nut -> Hide('logo'); $ext_nut -> Hide('deceased'); $ext_nut -> Hide('mem_id'); $ext_nut -> Hide('mem_points'); $ext_nut -> Hide('blank_1'); $ext_nut -> Hide('blank_2'); $ext_nut -> Hide('blank_3'); $ext_nut -> Hide('blank_4'); } //This person is not an admin and is looking at info of other people else if($clsLogin->GetUserId() != $_GET['user_id'] && !$clsLogin->IsUserTypeLoggedIn('COMS Administrator')){ /*$attributes_nut -> Hide('user_id'); $attributes_nut -> Hide('International_DDS_Program'); $attributes_nut -> Hide('UB_Staff'); $attributes_nut -> Hide('UB_Faculty'); $attributes_nut -> Hide('UB_PT_Faculty'); $attributes_nut -> Hide('Post_Grad_Resident'); $attributes_nut -> Hide('Retired'); $attributes_nut -> Hide('Speaker'); $attributes_nut -> Hide('Clinics_Groups'); $attributes_nut -> Hide('ACDE'); $attributes_nut -> Hide('Reviewed'); $attributes_nut -> Hide('Exhibitor'); $attributes_nut -> Hide('Company_Rep'); $attributes_nut -> Hide('Vendor'); $attributes_nut -> Hide('Advertiser'); */ $ui_nut -> Hide('priority'); $ui_nut -> Hide('allow_mail'); $ui_nut -> Hide('allow_email'); $ui_nut -> Hide('allow_display'); $ui_nut -> Hide('preferred'); $ext_nut -> Hide('demo_agd_number'); $ext_nut -> Hide('demo_spouse'); $ext_nut -> Hide('demo_former_name'); $ext_nut -> Hide('demo_ada_num'); $ext_nut -> Hide('demo_dental_school'); $ext_nut -> Hide('demo_year_graduated'); $ext_nut -> Hide('demo_specialty'); $ext_nut -> Hide('demo_ss_num'); $ext_nut -> Hide('demo_student_num'); $ext_nut -> Hide('demo_person_num'); $ext_nut -> Hide('demo_pager_num'); $ext_nut -> Hide('demo_website'); $ext_nut -> Hide('demo_date_death'); $ext_nut -> Hide('date_death'); $ext_nut -> Hide('demo_date_birth'); $ext_nut -> Hide('date_birth'); $ext_nut -> Hide('demo_gender'); $ext_nut -> Hide('demo_county'); $ext_nut -> Hide('list_alumni_codes'); $ext_nut -> Hide('list_cde_codes'); $ext_nut -> Hide('list_ub_grad_progs'); $ext_nut -> Hide('notes_general'); $ext_nut -> Hide('notes_resume'); $ext_nut -> Hide('notes_additional'); $ext_nut -> Hide('photo'); $ext_nut -> Hide('ub_dds_degree'); $ext_nut -> Hide('ub_post_grad_degree'); $ext_nut -> Hide('specialty'); $ext_nut -> Hide('logo'); $ext_nut -> Hide('deceased'); $ext_nut -> Hide('mem_id'); $ext_nut -> Hide('mem_points'); $ext_nut -> Hide('blank_1'); $ext_nut -> Hide('blank_2'); $ext_nut -> Hide('blank_3'); $ext_nut -> Hide('blank_4'); } if($_POST['submit_user']){ /* pretty_print_r($_SESSION['ui']); pretty_print_r($_SESSION['ext']); pretty_print_r($_SESSION['addr']); pretty_print_r($_SESSION['att']); pretty_print_r($_POST); */ $ui_keys = array_keys($_SESSION['ui']); foreach( $ui_keys as $key) { if(array_key_exists($key, $_POST)){ if(stripslashes($_POST[$key]) != stripslashes($_SESSION['ui'][$key]) && $key != 'user_id'){ $current_user = $_POST['user_id']; $newvalue = addslashes($_POST[$key]); $oldvalue = addslashes($_SESSION['ui'][$key]); $id = $clsLogin->GetUserId(); $sql = "INSERT INTO ".LOGIN_CHANGE_LOG." (user_id, changed_by, field, previous_value, new_value, date) VALUES ($current_user, $id, '$key', '$oldvalue', '$newvalue', NOW())"; $db->Query($sql); $sql = "INSERT INTO ".UPDATE_TABLE." (section, updated) VALUES ('Changed Member Info', NOW())"; $db->Query($sql); } } } $ext_keys = array_keys($_SESSION['ext']); foreach( $ext_keys as $key) { if(array_key_exists($key, $_POST)){ if(stripslashes($_POST[$key]) != stripslashes($_SESSION['ext'][$key]) && $key != 'user_id'){ $current_user = $_POST['user_id']; $newvalue = addslashes($_POST[$key]); $oldvalue = addslashes($_SESSION['ext'][$key]); $id = $clsLogin->GetUserId(); $sql = "INSERT INTO ".LOGIN_CHANGE_LOG." (user_id, changed_by, field, previous_value, new_value, date) VALUES ($current_user, $id, '$key', '$oldvalue', '$newvalue', NOW())"; $db->Query($sql); $sql = "INSERT INTO ".UPDATE_TABLE." (section, updated) VALUES ('Changed Member Info', NOW())"; $db->Query($sql); } } } foreach( $_SESSION['addr'] as $nut_key => $addr) { $nut_key_array = array_keys($_SESSION['addr']); $addr_keys = array_keys($addr); //$nut_key = $nut_key_array[0]; foreach( $addr_keys as $key) { if(array_key_exists($nut_key.$key, $_POST)){ if($_POST[$nut_key.$key] == 'No') $keyv = 0; else if($_POST[$nut_key.$key] == 'Yes') $keyv = 1; else $keyv = $_POST[$nut_key.$key]; if($keyv != $addr[$key] && $key != 'user_id'){ $current_user = $_POST['user_id']; $newvalue = addslashes($_POST[$nut_key.$key]); $oldvalue = addslashes($addr[$key]); $id = $clsLogin->GetUserId(); $sql = "INSERT INTO ".LOGIN_CHANGE_LOG." (user_id, changed_by, field, previous_value, new_value, date) VALUES ($current_user, $id, '$key', '$oldvalue', '$newvalue', NOW())"; //echo $sql."
"; $db->Query($sql); $sql = "INSERT INTO ".UPDATE_TABLE." (section, updated) VALUES ('Changed Member Info', NOW())"; //echo $sql."
"; $db->Query($sql); } } } } $addr_nuts->SetAllNutsField("user_id",$user_id); $ui_nut->SetAllData($_POST); $ext_nut->SetAllData($_POST); $addr_nuts->SetAllData($_POST); $ui_nut->Save(); $ext_nut->Save(); $addr_nuts->Commit(); // Quick fix to insert the row for the user //$_POST['UB_Faculty'] = "NO"; //$_POST['UB_PT_Faculty'] = "NO"; $attr_nut->SetAllData($_POST); $attr_nut->Save(); } $addr_nuts->SetTitle("Address", "", true); $ui_nut->SetTitleMapper($mapper); $ext_nut->SetTitleMapper($mapper); $addr_nuts->SetTitleMapper($mapper); /* $res_disp_query = "SELECT ev.eventid as EventID, ev.name AS EventName FROM ".DB_EMS_NAME.".user_reg AS ur LEFT JOIN ".DB_EMS_NAME.".registration AS reg ON ur.userid = reg.user_reg_userid LEFT JOIN ".DB_EMS_NAME.".event AS ev ON reg.event_eventid = ev.eventid WHERE ur.userid = {$user_id}"; $results = new CRecordChooser($res_disp_query, false, Array("onclick=\"window.location='./bios_view.php?user_id=[User]';\" style=\"cursor: pointer;display: inline\"",Array("[User]", "user_id")), false, DB_LOGIN_NAME); $results->SetRecordsPerPage(false); $results->LoadList(); */ ?>
"; $address_sql = "SELECT * FROM ".DB_LOGIN_NAME.".user_info_address WHERE user_id = '".$user_id."' AND address_type = '".$i."'"; $address_rs = $db->Query($address_sql); $addr_row = $db->GetRow($address_rs); print ""; print ""; print ""; } */ ?>
ToInputHtml();?> ToInputHtml();?>
ToInputHtml();?> "; /* for( $i=0;$i<4;$i++){ print "
"; print ""; print "Address #".($i+1).":"; print ""; print ""; print ""; if( $addr_row['address_1'] != '' ){ print substr($addr_row['address_1']." ".$addr_row['city'].", ".$addr_row['state_province']." ".$addr_row['zip_postal_code'], 0, 25)."..."; } else { print ""; print "No Address Found"; print ""; } print ""; print "
Member Dues Payment History:
ToHtml(); $dues_sql = "SELECT pay_amount,pay_date, pay_id FROM ".DB_NAME.".coms_payment WHERE pay_user_id = {$user_id} order by pay_date desc"; $dues_rs = $db->Query($dues_sql); print ""; print ""; print ""; print ""; print ""; print ""; while($dues_row = $db->GetRow($credit_rs)){ print ""; print ""; print ""; print ""; print ""; } print "
"; print ""; print "Payment Date"; print ""; print ""; print ""; print "Payment Amount"; print ""; print ""; print "
"; $dues_row_array = explode(" ",$dues_row['pay_date']); $dues_row_date = explode("-",$dues_row_array[0] ); print $dues_row_date[1]."/".$dues_row_date[2]."/".$dues_row_date[0]; print ""; print "$".$dues_row['pay_amount']; print ""; print "[X]"; print "
"; ?> Credit Information:
Query($user_info_sql); $user_info = $db->getRow($user_info_rs); // $id_sql = "SELECT * FROM ".DB_EMS_NAME.".user_reg WHERE fname = '$user_info[name_first]' AND lname = '$user_info[name_last]' "; $id_sql = "SELECT * FROM ".DB_EMS_NAME.".user_reg WHERE userid = $user_info[user_id]"; $id = $db->GetRow(false, $id_sql); if($id != false){ $credit_sql = "SELECT ".DB_EMS_NAME.".function.start_date,".DB_EMS_NAME.".cart.credit,".DB_EMS_NAME.".function.name,".DB_EMS_NAME.".function.code FROM ".DB_EMS_NAME.".cart, ".DB_EMS_NAME.".function WHERE user_reg_userid = $user_id AND ".DB_EMS_NAME.".cart.contentid= ".DB_EMS_NAME.".function.functionid AND ".DB_EMS_NAME.".cart.content_type='function' AND ".DB_EMS_NAME.".cart.credit > 0 union". " SELECT ".DB_EMS_NAME.".function.start_date,".DB_EMS_NAME.".cart.credit,".DB_EMS_NAME.".function.name,".DB_EMS_NAME.".function.code FROM ".DB_EMS_NAME.".cart, ".DB_EMS_NAME.".function WHERE user_reg_userid = $user_id AND ".DB_EMS_NAME.".cart.workshop_workshopid= ".DB_EMS_NAME.".function.functionid AND ".DB_EMS_NAME.".cart.content_type='session' AND ".DB_EMS_NAME.".cart.credit > 0 ORDER BY start_date DESC LIMIT 0,20" ; $credit_rs = $db->Query($credit_sql); } $record_found = 0; while($credit_row = $db->GetRow($credit_rs)){ print ""; print ""; print ""; print ""; print ""; print ""; $record_found = 1; } print "
Date Function Code Function Name Credits Earned
"; print date("m/d/Y",strtotime($credit_row['start_date'])); print ""; print $credit_row['code']; print ""; print $credit_row['name']; print ""; print $credit_row['credit']; $sum_credits = $sum_credits + $credit_row['credit']; print "
"; ?>